Forums / Templates, Stylesheets, Page Layout / display group pricing discount in product listing

display group pricing discount in product listing

Locked

Views: 1,748

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
8 Apr 2008, 11:03 AM
#1
aeisecurity avatar

aeisecurity

New Zenner

Join Date:
Feb 2008
Posts:
10
Plugin Contributions:
0

display group pricing discount in product listing

Hello everyone - as above im trying to display group pricing live on the site as opposed to in step 2 of the checkout...

i have not tried to modify ZenCart in this way before so this could get messy.

her is what i have done..

/includes/templates/template_default/templates/tpl_product_info_display.php

I have made the following changes;

<h2 id="productPrices" class="productGeneral">
<?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']);
?></h2>
<h2 id="productPrices" class="productGeneral">
<?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']);
  $rmprice = $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']);  
  echo '<del>';
  echo $rmprice;
  echo '</del>';
  $discount = $rmprice * $group_discount->fields['group_percentage'] / 100; 
  echo ' £'.$discount.'';
?></h2>

and it displays;

<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<del>£100</del> £0</h2>
<!--eof Product Price block -->

obviously its not picking up the percentage from

$group_discount->fields['group_percentage']

can anyone tell me where im going wrong?

Many Thanks! :D

29 Sep 2008, 1:17 PM
#2
esenterre avatar

esenterre

New Zenner

Join Date:
Sep 2008
Posts:
1
Plugin Contributions:
0

Re: display group pricing discount in product listing

Did you find the answer to your question after all ?

That's exactly what I'm trying to do, but I'm a newbie with ZenCart and it's hard for me to find the answer.

TIA!