
Originally Posted by
rstevenson
I see it works on your site. Unfortunately, when I replaced all occurrences of the string you showed above with the string below that, I got errors.
I replaced... zen_get_info_page($listing->fields['products_id']
with... $_GET['main_page']
seven times in the product_listing.php file. I must have made a mistake somewhere.
I did notice that the first part (the one I replaced) was enclosed in round brackets, but in your replacement, the closing bracket was missing. Maybe that was intentional?
Rob
I only replaced it once. Just below the line;
PHP Code:
// qty box with add to cart button
, there's a line that (in my code) reads;
PHP Code:
$lc_button= zen_draw_form('cart_quantity_' . $listing->fields['products_id'], zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input align="top" type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']);
This is where the form that processes the add to cart button is created. If you change it anywhere else I really don't know what makes the code fail, but surely it does...
//TrondOS