Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add to Cart not working


spiderweb

Recommended Posts

Hello,

 

When selecting Add to Cart from the Product Listings all works ok.

 

When selecting a product, then more information, then selecting Add to Cart nothing happens.

 

I think this is the line of code;

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

 

 

Could someone let me know what I have done wrong.

 

Thanks

Link to comment
Share on other sites

Hello,

 

When selecting Add to Cart from the Product Listings all works ok.

 

When selecting a product, then more information, then selecting Add to Cart nothing happens.

 

I think this is the line of code;

 

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

Could someone let me know what I have done wrong.

 

Thanks

 

 

Can check your webpage... I need to c what exactly going on

 

It could be your product_info.php.

 

Check the action or check the value that you past when you click ADD_Cart

Erwin D. Padilla

Web Developer and Linux Admin

Link to comment
Share on other sites

Most of the time when a button doesn't work in osC it's 'cuz you're missing the </form> tag later in the code.

 

Like the previous person said, without a link to see you're HTML source, we're just shootin' in the dark....

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

MAKE A BACKUP BEFORE MAKING ANY EDITS!!!

 

Edit your /shop/product_info.php to look like this:

 

<!-- body_text //-->
<td width="100%" valign="top">
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">

All that code is already there except this one line, the main part:

 

	<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Sorry I meant to give the link;

 

http://www.hornydevils.com.au/shop/product...products_id=110

 

Thanks

 

Check your includes/application_top.php

 

Look in the cart section if your code it look ok

 

If not your problem is in the /includes/classes/shopping_cart.php

Erwin D. Padilla

Web Developer and Linux Admin

Link to comment
Share on other sites

:thumbsup:

 

P.S. - It's in there:

 

<form name="cart_quantity" action="http://www.hornydevils.com.au/shop/product_info.php?cPath=21_79&products_id=110&action=add_product" method="post"> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...