Shopping Cart |
http://localhost/ShoppingCart/
Shopping Cart Fatal error: Call to undefined function form_open() in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\ShoppingCart\application\views\welcome_message.php on line 70 A PHP Error was encountered Severity: Error Message: Call to undefined function form_open() Filename: views/welcome_message.php Line Number: 70 Backtrace: I already input shopping cart codes into the following messages: views/welcome_message.php PHP Code: <?php controllers/Welcome.php PHP Code: <?php Can anyone help me detect the errors?
" If I looks more intelligence please increase my reputation."
Hello Davy_yg. Make sure your form_helper has been loaded.
Also, make sure you read through the docs thoroughly. Most of the questions you've posted here can be answered by reading the documentation.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Oh, and just to add. I'm pretty sure the shopping cart class is deprecated and scheduled for removal. I would suggest finding an alternative library with active development via composer
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
also you have another error in your view file - close the form after the submit button.
There is none, make your own. A good cart is only responsible for two things - the product id and the quantity.
It also holds some other information, like the product name and the product price - but its not 'responsible' for that info especially the price. Put this another way - someone puts a product in the cart. They come back a week later to check out. Meanwhile that products price has gone up, or the product has gone out of stock and is not available at all. Either of those conditions will be very bad for your merchant. So the cart is not in charge of those things, which means it needs to ask the Product table - is this still in stock? is this still the price? etc. The cart is also not in charge of shipping, tax, discounts, or any order totals. Use a separate shopping session table for that. And when the order is paid for the carts job is done. Make separate tables for the Order and Order Items. Then your cart never has historical data that must be kept, and your Orders and Order Items tables are private and everything in them is historical data.
(05-13-2016, 11:03 AM)cartalot Wrote: There is none, make your own. A good cart is only responsible for two things - the product id and the quantity. There is none? A quick search found a few with active development or a ton of users using it. The Search: https://packagist.org/search/?q=cart Packages with active development: https://packagist.org/packages/sylius/cart https://packagist.org/packages/darryldecode/cart (Made for laravel, but I'm sure it can be used in CI) https://packagist.org/packages/moltin/cart (Has a ton of users using it)
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
(05-13-2016, 12:01 PM)albertleao Wrote: There is none? hey i apologize i was not being entirely serious and i was responding to the OP not your suggestion. i almost wrote - if you find a good codeigniter cart please let us know. that said i looked at everything you posted and unless i'm missing something none of them are codeigniter. so if you are going to jump to another framework i would suggest you jump all the way to Ruby and use Spree. its probably the best open source e-commerce system right now. but if you want to do e-commerce with codeigniter, and you are wondering about the cart library - make your own and here is why. thats what my reply was directed to. |
Welcome Guest, Not a member yet? Register Sign In |