Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Posts
    6
    Plugin Contributions
    0

    Default Is it possible to apply discount to store pickup customers?

    Almost ready to launch but I have hit a brick wall. I need to be able to offer customers who select store pickup as their shipping option a 10% discount on their total order price. Is this possible?

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

    Default Re: Is it possible to apply discount to store pickup customers?

    You could build an Order Total module that only runs when the:
    $_SESSION['shipping']['id']

    is set for your shipping module where you want to add the discount ...

    You can look at the add ons for the Order Total Modules in the Free Software Add Ons and see which might be the best to adapt or customize ...

    Or, look at the Group Pricing ot_group_pricing Order Total Module and clone that ...
    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!

  3. #3
    Join Date
    May 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Is it possible to apply discount to store pickup customers?

    Thanks for that Linda.

    I did have a look at those files and I was thinking the same. I also looked at the add-on "Military Discounts" which has a feel for what I want to achieve, but not being brilliant with php I'm not exactly sure which file is best to clone and where to make the alterations.

    Don't suppose you could point me in the right direction?

    I'm thinking of using ot_group_pricing.php?

    Wait a minute - I have just looked at the file again and I think I see it - it has to be within the "function calculate_deductions($order_total)" section.

    If I clone this file and call it say "ot_storepickup_discount.php" and within the above function instead of calling for the group_percentage from the db, I call for the percentage from a new configuration setting (that way I don't have to play around too much with the database) I reckon that would achieve what I am after. I do not have to worry about gift vouchers, tax etc - they will never be used so I will leave all reference to those items as is. What do you think? I'll give it a go and see where it leads me!

    Any thoughts though would be welcome.

  4. #4
    Join Date
    May 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Is it possible to apply discount to store pickup customers?

    OK - I have done it and it works perfectly.

    I cloned the Group Discount Module as suggested and installed it, but instead of calling for discounts from the group_discount table, I set up some extra fields in the configuration table:

    STOREPICKUP_DISCOUNT_STATUS (true or false)
    STOREPICKUP_DISCOUNT_VALUE (numeric value to represent the percentage of discount)

    Then I simply altered the code within my new module file to apply the discount only if the status is true and only when shipping is set to storepickup_storepickup

    Simples, as the Meerkat says!

    I've got to say that although I can find my way round php files and generally have a very rough idea of what the code is implementing, I am by no means an expert. However, the store I am currently working on is by far the most complicated I have had to build and customising the code is really quite easy when you apply logic. Everything is well structured and easy to find.

    My hats off to the developers and their tutorials and the contributors to these forums - I don't think there is anything you cannot do with ZenCart.

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

    Default Re: Is it possible to apply discount to store pickup customers?

    Thanks for the update that you have this working now and the method you used ...
    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!

 

 

Similar Threads

  1. v151 Store pickup; category/product level discount
    By WetSteve in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Sep 2015, 06:40 PM
  2. Discount for Store Pickup
    By harun in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 18
    Last Post: 28 Jan 2011, 12:50 AM
  3. How do I allow customers to pay cash upon pickup at store?
    By jvanree in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 29 Nov 2010, 06:50 AM
  4. Discount for Pickup in Store...?
    By bbjay in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Apr 2009, 09:15 PM

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