Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2005
    Posts
    392
    Plugin Contributions
    0

    Default Discount Coupon Applicable for Regular Price Item Only?

    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

  2. #2
    Join Date
    Jul 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    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?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    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!

  4. #4
    Join Date
    Jul 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    Oh, thought if someone had a ready-made solution so that I would not need to tweak the code myself... :)

  5. #5
    Join Date
    Jul 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    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?

  6. #6
    Join Date
    Jul 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    Anybody interested, this is what I did, and it works: (for me)

    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
    What I wanted, is 10% discount given on products, which have certain attribute name and certain attribute value.
    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

  7. #7
    Join Date
    Apr 2006
    Posts
    32
    Plugin Contributions
    0

    customer issue Re: Discount Coupon Applicable for Regular Price Item Only?

    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?

  8. #8
    Join Date
    Jul 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: Discount Coupon Applicable for Regular Price Item Only?

    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.

 

 

Similar Threads

  1. Discount coupon for one item confusion
    By RobWUK in forum General Questions
    Replies: 2
    Last Post: 25 Nov 2011, 12:16 AM
  2. Discount Price per item with Free Shipping with Coupon Code?
    By JRayfield in forum Setting Up Specials and SaleMaker
    Replies: 9
    Last Post: 2 Mar 2010, 03:15 PM
  3. Coupon for only one item. and only for people I tell
    By replicapropscom in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 29 Jun 2009, 03:50 PM
  4. Discount price shown as regular price
    By TomCZ in forum General Questions
    Replies: 3
    Last Post: 24 Jan 2008, 02:36 PM
  5. coupon for specific item only?
    By w2e in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 9 Nov 2007, 07:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR