I'm working on a legacy system (v1.38) at present and have found that the Xsell feature produces a duplicate ID on the page for both the add to baskets of the product and the cross-sell product - "image_submit". Not entirely sure how I can rename this latter (xsell) to avoid this issue and not screw up everything else?
// add add_to_cart button
$add_to_cart_text = '<form name="cart_quantity" action="index.php?main_page=product_info&products_id=' . (int)$xsell_query->fields['products_id'] . '&action=add_product" method="post" enctype="multipart/form-data">
<input type="hidden" name="cart_quantity" value="1" /><input type="hidden" name="products_id" value="' . (int)$xsell_query->fields['products_id'] . '" />';
$add_to_cart_button = zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, "style=\"padding: 0px;\"");
$display_add_to_cart_button = zen_get_buy_now_button($xsell_query->fields['products_id'], $add_to_cart_button);
$add_to_cart_text .= $display_add_to_cart_button . '</form>';


Reply With Quote
