Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / buy now button - specials on main page

buy now button - specials on main page

Views: 746

Results 1 to 4 of 4
22 Jan 2011, 4:08 PM
#1
tcjay avatar

tcjay

Zen Follower

Join Date:
Jul 2010
Location:
Boston
Posts:
139
Plugin Contributions:
0

buy now button - specials on main page

I am using this code:

$products_price = zen_get_products_display_price($specials_index->fields['products_id']);
$products_desc = substr(strip_tags(trim(zen_get_products_description($specials_index->fields['products_id'], $_SESSION['languages_id']))),0,100).'…';
$buy_now_link = zen_get_buy_now_button($specials_index->fields['products_id'],'<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials_index->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) .'<br/>'.'</a> <br /');
if (!isset($productsInCategory[$specials_index->fields['products_id']])) $productsInCategory[$specials_index->fields['products_id']] = zen_get_generated_category_path_rev($specials_index->fields['master_categories_id']);
$list_box_contents[$row][$col] = array('params' =>'class="back"' . ' ' . 'style="width:' . $col_width .'%;">'.$buy_now_link,
'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">'.zen_image(DIR_WS_IMAGES .$specials_index->fields['products_image'], $specials_index->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($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a></p>'. $products_price . '<p>' . $buy_now_link.'</p>');

I used something with similar logic for the featured products and it worked but am having no luck with specials. Can anyone see what Is wrong? TIA Tom :cool:

23 Jan 2011, 11:18 AM
#2
tcjay avatar

tcjay

Zen Follower

Join Date:
Jul 2010
Location:
Boston
Posts:
139
Plugin Contributions:
0

Re: buy now button - specials on main page

24 Jan 2011, 7:49 PM
#3
gizzy avatar

gizzy

New Zenner

Join Date:
Jan 2011
Posts:
9
Plugin Contributions:
0

Re: buy now button - specials on main page

were do you put this code?

24 Jan 2011, 9:19 PM
#4
tcjay avatar

tcjay

Zen Follower

Join Date:
Jul 2010
Location:
Boston
Posts:
139
Plugin Contributions:
0

Re: buy now button - specials on main page

/includes/modules/specials_index.