Is there any way to display the Quantity Discounts table on the Product Listing page?
1-5 = $10.00 | 6-10 = $8.00 | 11-25 = $7.50
Is there any way to display the Quantity Discounts table on the Product Listing page?
1-5 = $10.00 | 6-10 = $8.00 | 11-25 = $7.50
Sure, custom product type with some code that processes the discount data from the `products_discount_quantity` table.
That enough to get the wheels turning?
Thanks for the reply BlindSide. Could you please be a little more specific?
Well you'll need to build a custom template. There's plenty of documentation on that, so I won't get into it here. The primary thing is the products_discount_quantity table. This is where product qty discounts are stored.
You'll need to write some PHP to look up the discounts for the given products_id and output it to your template. You can look at the code in admin/products_price_manager.php to start figuring out how it works.
Or, another way to look at this is ...
In the module for product_listing.php ...
You will see a section of code commented out ...
This is where you can add a new row of data to the listing ...
This is a partial list of what you need to do this ...
What this will do is produce the quantity discounts above the Product Listing as the tpl_ used is from the tpl_product_info_display.php and you need to translate that ...
Just above the MoveNext ... change this code:
PHP Code:
}
$listing->MoveNext();
To read this code:
Again you have to redo the info in tpl_modules_products_quantity_discounts.php to work with the listing properly, but this should get you all the data ... now you come up with the nice display method and post it here ...PHP Code:
$products_discount_type = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type');
if ($products_discount_type != 0) {
$rows++;
$products_id_current = (int)$listing->fields['products_id'];
$quantityDiscounts = array();
$products_discount_type_from = zen_products_lookup($listing->fields['products_id'], $what_field = 'products_discount_type_from');
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCTS_QUANTITY_DISCOUNTS));
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php');
}
$listing->MoveNext();
How hard can that be?
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I was gonna let him do the work Linda, but whatever...
I left the fun stuff of the translation for kgmmusic to figure out ... and report back here ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Hi Ajeh
My discount table is a pop up. How do I change the layout into a table that stays on a the product page like this page http://www.americanbridal.com/heartsoaps.html.
Thanks for your help.
Are you using Attribute Qty Discounts? Or the discounts in the Products Price Manager?
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Hi Ajeh,
Thanks for the reply. I got the problem solve. I use Product Price Manager. My table looks like this below:-
Qty Discounts Off Price 50
$4.50 50-99
$4.00 100-149
$3.80 150-199
$3.60 200-249
$3.40 250-299
$3.20 300+
$3.00 * Discounts may vary based on options above
In fact its all wrong. Is suppose to be like this:-
50-99
$4.50100-149
$4.80150-199
$3.80200-249
$3.60250-299
$3.40300+
$3.20
How to correct them?
Bookmarks