I have set up a discount coupon and wish to make it applicable only to regular price items only. Thus far, I can only find restriction base on category and product. Is there a blanket restriction to "Deny" product(s) that are on promotion?
TIA
I have set up a discount coupon and wish to make it applicable only to regular price items only. Thus far, I can only find restriction base on category and product. Is there a blanket restriction to "Deny" product(s) that are on promotion?
TIA
Bump.
... or rather to have coupons to apply only on products, which are not having attribute name "gift" ?
... or alternatively, you have a product with attribute name of "Type" with three different values, where discount coupon would not apply if Type "xyz" is selected.
... or the ultimate answer for my need, the group discount applies only on products, where certain attribute is not existing.
How can I achieve that?
You would need quite a bit of custom coding done for this and may be better off posting in the Commercial Help Wanted to get the custom coding written for this ...
This is not an easy task ...
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!
Oh, thought if someone had a ready-made solution so that I would not need to tweak the code myself... :)
I figured, that following SQL gives me what I need to know:
select sum(products_quantity*final_price*(products_tax/100+1)) as sum from zen_orders_products where orders_id=27 and orders_products_id in (select orders_products_id from zen_orders_products_attributes where orders_products_id in (select orders_products_id from zen_orders_products where orders_id=27) and Products_options='Tyyppi' and product_attribute_is_free=1);
So, basically that SQL gives me the sum-value of the products ordered, where I want to apply group discount. ie. those products have been selected with certain attributes by purchaser.
in ot_group_pricing.php I found following line:
$discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;
Now, the only thing what I seem to need to do is to replace $order_total with the output of my SQL clause.
The only last problem is that I am not able figure out which variable contains the orders_id in ot_group_pricing.php
Ideas?
Anybody interested, this is what I did, and it works: (for me)
What I wanted, is 10% discount given on products, which have certain attribute name and certain attribute value.Code:// Mod - start // $discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100; $normals = $db->Execute("select sum(p.products_price*b.customers_basket_quantity) as sum from zen_customers_basket b, zen_products p where b.products_id in (select ba.products_id from zen_customers_basket_attributes ba where ba.customers_id='" . (int)$_SESSION['customer_id'] . "' and ba.products_options_id=1 and ba.products_options_value_id=1) and p.products_id=substring_index(b.products_id,':',1);"); $discount = ($normals->fields['sum'] - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100; // Mod - end
Above hardcoded mod inserted into ot_group_pricing.php and users in discount group, which has that 10% discount gives the desired results.
This effectively disables normal group discount system and may break something else as well ... But serves the purpose for me
So what you are saying is that if I have specials and on top of that a coupon/discount/newcustomer then I would be applying the discount on top of the specials?
So your option removes this? Did anything break?
This mod has an effect only on the group discount module, other modules should operate as normal.
I have not noticed any unwanted behaviour because of this.
Bookmarks