Zen Follower
- Join Date:
- Mar 2009
- Posts:
- 103
- Plugin Contributions:
- 0
Add to cart, don't display product_info?
Hi
First of all, I have got one "add to cart" button for each item.
However, once the "add to cart" button is clicked Zen Cart adds the product to the cart as well as displays the product information page. I want it to only add the product to the cart and not display the product information. How do I do that?
I've tracked it down to this code in includes/modules/product_listing.php
// qty box with add to cart button
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
If I remove the following string
zen_get_info_page($listing->fields['products_id']),
Zen Carts adds the product, but still displays a new page (which is now a 404).
Can I code it to only "refresh" where I'm currently at?
Thanks in advance