copy Quantity Discounts to some products or catalog,it will as copy attributes
as the tittle,have any one can help me'?
because we have a lot of same price and same Quantity Discounts for products,as a lot of t-shirts,jeans,etc.
so we need some function as below.please help us.
copy Quantity Discounts to some products or catalog,it will as copy attributes to one or some products,one or some catalog.
Thanks
Re: copy Quantity Discounts to some products or catalog,it will as copy attributes
There isn't anything built into Zen Cart for copying the Quantity Discounts setup on one Product to another existing Product or Category of Products ...
There is a function to make this copy from one product to another that might help on this:
Quote:
////
//copy discounts from product to another
function zen_copy_discounts_to_product($copy_from, $copy_to) {
Re: copy Quantity Discounts to some products or catalog,it will as copy attributes
Quote:
Originally Posted by
Ajeh
There is a function to make this copy from one product to another that might help on this:
Hi,thanks your reply,but how to use it,can you place a example,i'm newbie,and is it only copy qty price?and if it can copy p to p,then i think you can wirte a function to copy p to catalog,is it right? lol
Re: copy Quantity Discounts to some products or catalog,it will as copy attributes
Pick products_id to copy Discount Quantities from ...
Pick categories_id to get Products to copy Discount Quantities to ...
Get all products_id from the categories_id to be used to copy Discount Quantities ...
Loop through products_id of categories_id to copy to and:
1 remove existing discount quantities that might exist for products_id
2 build new discount quantities with zen_copy_discounts_to_product