Using 1.3.9h and wondering how we can make this part of code we altered add that product directly to the cart, right now when you click the Buy It Now button it just takes the customer to the product listing page not the actual product or the shopping cart.
This is an alter to the index new products section added a buy it now button.
any advice is appreciated.
Code:while (!$new_products->EOF) { $products_price = zen_get_products_display_price($new_products->fields['products_id']); //$products_desc = substr(strip_tags(trim(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))),0,100).'…'; //$vendor_name = zen_get_products_manufacturers_name($new_products->fields['products_id']);//this is the manufacture name //$vendor_id = zen_get_products_manufacturers_id($new_products->fields['products_id']);//this is the manufacture name //$vendor_link = '<a href="'.zen_href_link('index', 'manufacturers_id='.$vendor_id, 'NONSSL').'">'.$vendor_name.'</a>'; $buy_now_link = zen_get_buy_now_button($new_products->fields['products_id'],'<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> '); if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']); $list_box_contents[$row][$col] = array('params' =>'class="back"' . ' ' . 'style="width:' . $col_width . '%;"', 'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<div class="d_imgbox"><a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a></div><p>') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a></p>'. $products_price.'</p><p>'.$buy_now_link.'</p>'); $col ++; if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) { $col = 0; $row ++; } $new_products->MoveNextRandom(); }



