Zen Cart Logo
Forums / Basic Configuration / Qty Discount display problems

Qty Discount display problems

Locked

Views: 3,064

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
27 Feb 2009, 12:48 AM
#1
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Qty Discount display problems

I have add 5 qty discount
but it doesnt display in the products page.
anyone know what's the reason?

27 Feb 2009, 10:01 AM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Qty Discount display problems

You probably put the data into the fields while the admin page was in "VIEW" mode.

You must click the "EDIT" button, then insert the data.

27 Feb 2009, 4:00 PM
#3
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

Oh,I have click the 'edit' button and fill the 5 blank Qty Discounts,and click the 'update' button,
but it doesnot display in the products page.

27 Feb 2009, 5:02 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Qty Discount display problems

Have you checked the settings in ADMIN>>>CONFIGURATION>>>LAYOUT>>>:
*
Product Discount Quantities - Add how many blank discounts?
Product Discount Quantities - Display how many per row?*

You could have a faulty PHP file. We'll need to see a link to your site to help further.

28 Feb 2009, 5:48 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

And if you switch to the Classic Template does it show?

If so, you have a template issue ...

I can see the beginning and ending tags for the:
Quantity Discounts table

in the view source ...

1 Mar 2009, 9:31 AM
#7
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

Oh,I have delete the classic template,
As you said, what is the fault file maybe

1 Mar 2009, 3:11 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

Removing the Classic Template really poses issues for testing for problems with your template ...

This could be several things ...

I'd first look at the product _info file for:
/includes/templates/template_default/templates/tpl_product_info_display.php

Compared to your file:
/includes/templates/your_template_dir/templates/tpl_product_info_display.php

And see what has happened to this code:

<!--bof Quantity Discounts table -->
<?php
  if ($products_discount_type != 0) { ?>
<?php
/**
 * display the products quantity discount
 */
 require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
<?php
  }
?>
<!--eof Quantity Discounts table -->
1 Mar 2009, 3:45 PM
#9
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

<!--bof Quantity Discounts table -->
			<?php

			  if ($products_discount_type != 0 || $categories_discount_type != 0) { ?>

			<?php

			/**

			 * display the products quantity discount

			 */

			 require($template->get_template_dir('tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>

			<?php

			  }

			?>

			<!--eof Quantity Discounts table -->

This is my template code.

1 Mar 2009, 4:48 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

If you go to the Product Price Manager ... what is the Product Discount Type used by this product?

How many do you have?

If you look at your template file for:
tpl_modules_products_quantity_discounts.php

Are you using an override or the default?

2 Mar 2009, 12:57 AM
#11
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

I have click the 'edit' button and fill the 5 blank Qty Discounts,and click the 'update' button in admin.
tpl_modules_products_quantity_discounts.php

<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_modules_products_quantity_discounts.php 3291 2006-03-28 04:03:38Z ajeh $ */ ?> <ul id="productQuantityDiscounts"> <?php if ($zc_hidden_discounts_on) { ?> <table border="0" cellspacing="0" cellpadding="0" id="table_info"> <tr> <td colspan="1" align="center"> <?php echo TEXT_HEADER_DISCOUNTS_OFF; ?> </td> </tr> <tr> <td colspan="1" align="center"> <?php echo $zc_hidden_discounts_text; ?> </td> </tr> </table> <?php } else { ?> <table border="0" cellspacing="0" cellpadding="0" id="table_info"> <tr> <th align="center">Qty.Range(unit)</th> <th align="center">Price(per unit)</th> <th align="center">Discount</th> </tr> <tr>
</tr>

<tr>
  <td align="center"><?php echo $show_qty; ?></td>
  <td align="center"><?php echo  $currencies->display_price($show_price, zen_get_tax_rate($products_tax_class_id)); ?></td>
  <td align="center"> No</td>
</tr>
<?php foreach($quantityDiscounts as $key=>$quantityDiscount) { ?> <tr> <td align="center"><?php echo $quantityDiscount['show_qty'] ?></td> <td><?php echo $currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id)); ?></td> <td><?php echo $quantityDiscount['discount'] ?></td> <?php $disc_cnt++; if ($discount_col_cnt == $disc_cnt && !($key == sizeof($quantityDiscount))) { $disc_cnt=0; ?> </tr> <?php } } ?> <?php if (zen_has_product_attributes($products_id_current)) { ?>
<tr>
  <td colspan="<?php echo $columnCount+1; ?>" align="center">
    <?php echo TEXT_FOOTER_DISCOUNT_QUANTITIES; ?>
  </td>
</tr>
<?php } ?> </table> <?php } // hide discounts ?> </ul>
3 Mar 2009, 8:39 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

If you go to this Product in the Product Price Manager ... what do you have set on the:
Discount Type:
Discount Priced from:

3 Mar 2009, 11:13 PM
#13
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

percentage price

4 Mar 2009, 4:35 AM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

Very Odd ...

I can reproduce your error if I change the Discount Type to None and then I do not get the Discounts to display and only have the tags ...

If you go to that Product ...

What happens if you rename your template on the server to:
/includes/templates/lightinthebox_HIDEME

and refresh the page?

NOTE: things will look all squirrely when you do this ... the point is does the Discount Quantities show?

Then rename your template back to restore your current look from:
/includes/templates/lightinthebox_HIDEME

back to:
/includes/templates/lightinthebox

4 Mar 2009, 10:20 AM
#15
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

I have do that as what you said ,and when I rename it and refresh.
Warning: main(includes/templates/template_default/sideboxes/tpl_categories_css.php) [function.main]: failed to open stream: No such file or directory in /home/mov700/public_html/szhif/includes/modules/sideboxes/lightinthebox/categories_css.php on line 30

Warning: main(includes/templates/template_default/sideboxes/tpl_categories_css.php) [function.main]: failed to open stream: No such file or directory in /home/mov700/public_html/szhif/includes/modules/sideboxes/lightinthebox/categories_css.php on line 30

Warning: main(includes/templates/template_default/sideboxes/tpl_categories_css.php) [function.main]: failed to open stream: No such file or directory in /home/mov700/public_html/szhif/includes/modules/sideboxes/lightinthebox/categories_css.php on line 30

4 Mar 2009, 4:32 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

Despite that error ... could the screen draw?

If so, could you see the Discount Quantities?

5 Mar 2009, 12:42 AM
#17
bdj1 avatar

bdj1

New Zenner

Join Date:
Dec 2008
Posts:
16
Plugin Contributions:
0

Re: Qty Discount display problems

It also didnt display.
but when I bought 5 or 10 products, It calculate as the discount that I set.
It only didnot diplay in the products pages.

5 Mar 2009, 5:43 PM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Qty Discount display problems

Without going through your site to see what is wrong with your files this is really hard to break down ...

You might try Beyond Compare from scootersoftware.com and see if you can see any differences in the files from a clean checkout vs the files that you are using ...

There is also a Debug Tool in the Free Software Add Ons that might help spot this issue ...