Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add to cart not working on product_info.php, help!


memzz

Recommended Posts

Posted

Hi hope someone can help, I've been through scores of other posts but none seem to be able to help.

 

Basically i recently updated a friends website with a contribution (Product Info Page Box Version 2.2) and since then when you click on buy now in the product listing it works fine, but on the product_info page if you click on the add to cart button then you are just diverted to the index (home) page with nothing being added to the cart, if 'display cart after adding product' is true then it goes to the shopping cart saying 'your cart is empty'!.

 

I have tried replacing the edited files with backups but it still won't work, the about installed contribution also called for a database change which i haven't tried undoing as i'm pretty confident this isn't the problem.

 

Hope someone can help or point me in the right direction even, the site is live so any help is greatly appreciated!

 

Thanks in advance :)

Posted

Also wanted to add that another contribution that shows users there last visited products has stopped showing the images, although the names and links work fine. It basically is now unable to get a thumb image?

 

I just thought this might help in figuring out what is wrong.

Posted

Hi

 

It could be a number of things but I'd go see if it is posting the correct data when you click 'buy' - it should be sending you to

 

http://yourdomain.com/catalog/product_info.php?products_id=xxxx&action=add_product

 

and there should also be a POST field holding products_id and the value xxxx (where xxxx is your products_id)

 

I'd bet on the latter having gone missing - check that there is the code

   <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

 

Towards the foot of the file and also that it is followed by a </form> tag

Also check that any add-ons you have added have not popped an extra </form> tag in above the tep_draw_hidden_field

Posted

Hi Bob thank you for your reply :0) i will investigate what you have said and report back. Thanks

Posted

Ok i've sort of fixed it!, Basically what i think was happening was this . . when i modified the product_info page i forgot to add back in the quantity box i had previously installed, it was still being called for in application_top . . I re-added the quantity box onto the product_info page and it now adds the product to the shopping cart, although it is still going off to the index(home) page for some reason?

Archived

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

×
×
  • Create New...