Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Not adding items to cart!


schmodi

Recommended Posts

I have looked on the boards for this but haven't been able to find much. Please somebody take five minutes and help me regain my sanity!

 

I have installed the cart successfully except for this problem. I have retried installation 3 times and still this problem.

 

I select any item and then when I hit the "Add this item to cart" button at the bottom of the page (catalog/index.php), it takes me to the catalog/shopping_cart.php page and says "Your cart is empty."

 

I can, however go into the acutal product page where all the details are and click on the "Add to Cart" button and it will add it.

 

Someone please help! I'm so close!!!

Link to comment
Share on other sites

compare the parameters(POST/GET) that are passed in both cases.

as far as I remember to add something to the cart it only needs product_id basically.

check out application_top.php where both situations are handled and look for something contradictory.

Link to comment
Share on other sites

I'm sorry ranxero! I've tried really! But I can't make heads or tails of the php or even where I should be looking for this code. I'm assuming from your post it is "application_top.php" but if you could take a few more minutes and give me some further instructions, I would be so grateful.

 

Seems like it should be something simple. This is driving me nuts. Four days wasted on this!

Link to comment
Share on other sites

maybe you should get more familiar with php ;)

 

anyway ...

 

look in catalog/index.php for the link or submit button 'Add this item to cart'.

do this when the browser has displayed(right click/view source) the page to see all the post(html-form) and get(added after the '?' to the url) parameters.

 

do the same thing on the product_info.php when the browser has displayed it.

 

compare the parameters and check if something is missing.

 

or post it here.

but you should really learn more about http requests and repsonses and what is connected to it and how php works.

there's not so much I can do on this basis here to help with your problem

 

cheers

Christian

Link to comment
Share on other sites

  • 6 months later...

I am having this same problem and when I view the get and post this is what comes up between the index.php and the product_info.php

 

Form
Id	Name	Method	Action
cart_quantity	post	http://www.royceturfandirrigation.co.uk/catalog/index.php/cPath/34/sort/3a/action/add_product

Elements
Id	Name	Type	Value
products_id	text	90
cart_quantity	text	1

that is index an below is product_info

Form
Id	Name	Method	Action
cart_quantity	post	http://www.royceturfandirrigation.co.uk/catalog/product_info.php/products_id/205/action/add_product

Elements
Id	Name	Type	Value
products_id	text	205

 

I see where on the index page it has cart_quantity call but on product_info there is none, however having scoured through the php files I can't find the call to cart_quantity in either file...help? suggestion? anything?

Link to comment
Share on other sites

  • 7 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...