Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Display Product Attribute Price on Product LISTING Page

Display Product Attribute Price on Product LISTING Page

Views: 943

Results 1 to 2 of 2
23 Aug 2013, 6:30 PM
#1
y0ul053 avatar

y0ul053

New Zenner

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

Display Product Attribute Price on Product LISTING Page

Here's a quick run down on my scenario. Due to the nature of my industry (surplus textlies), I allow customers to obtain a free sample. The easiest way to allow that seemed to adding attributes to each product. One to order the product, and another for a free sample. Since one attribute needed to be completely price free, I set product prices to 0, the free sample attribute to 0, and the other attribute to the actual pricing.

Due to that workaround, when browsing through products in a category (product listing) all the prices are blank. I would like for the attribute holding the actual price to be displayed. I attempted to take part of:

 <?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?> 

from /includes/templates/aberdeen_neutral/templates/tpl_product_info_display.php and put it in /includes/modules/aberdeen_neutral/product_listing.php in place of $lc_price in:

        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  $lc_price; 

It appears as though I failed though. It still remained blank :(

I see a bunch of closed 5yr old threads on this subject but none of them appear to have any sort of answer. Any help would be appreciated. Thanks

23 Aug 2013, 6:46 PM
#2
y0ul053 avatar

y0ul053

New Zenner

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

Re: Display Product Attribute Price on Product LISTING Page

I'm an idiot. Don't need help, it's all good ;p

Delete/close thread please.