Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default External member discount code implementation

    Greetings,

    I am working on a site that will issue a %10 discount to members of an external site. The site provides code examples on how to interface with the system here: http://ba.brewersassociation.org/ws/ahamember.asmx

    If the member number entered is valid the system returns the following XML:

    <memberstatus MemberID="00000001">
    <FullName>John Doe</FullName>
    <IsMember>true</IsMember>
    <MemberInfo Type="AHA" Status="A" Expiration="2012-10-31T00:00:00" />
    </memberstatus>
    If valid, a discount would be applied to the customers order.

    Any ideas on where to start with this one? I've spent a lot of time around code but am not that familiar with ZC.

    I really appreciate your help!

    Cheers,
    Sean-Paul

  2. #2
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: External member discount code implementation

    You could clone the ot_coupon order-total module, and alter its validation lookup from doing a check on internal db tables to do the external lookup. If validation passes then it can pass on the discounts into the order during checkout.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: External member discount code implementation

    DrByte, when you say "Clone" do you mean to copy the actual PHP page or is that a function within ZC?

    Thanks for your help.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: External member discount code implementation

    By "clone" of an order-total module, I mean to make a duplicate copy of the corresponding PHP files and then customize the PHP code and language strings in them to suit your needs.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: External member discount code implementation

    Quote Originally Posted by DrByte View Post
    By "clone" of an order-total module, I mean to make a duplicate copy of the corresponding PHP files and then customize the PHP code and language strings in them to suit your needs.
    OK, I've made copies of both the "ot_coupon.php" module and language files and named them uniquely. I have also renamed the "ot_coupon" class and changed the naming on the language constants as well. However, I've looked and looked but can't find where to include/call the newly made files. In which PHP file do I call them up?

    Thanks!
    SP
    Last edited by spmckee; 29 Mar 2013 at 01:53 AM.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: External member discount code implementation

    You can turn on a module in Admin->Modules->Order Total
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Discount Coupon - New Member question
    By KRW Knitwear in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 21 Jun 2010, 11:48 PM
  2. new member discount
    By vanhorn_s in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Apr 2010, 03:50 PM
  3. Discount Code - Invalid Code Message Not Appearing - FEC
    By pennylane in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jan 2010, 11:21 PM
  4. Code: is customer member of discount group? - restricting view based on membership
    By wputler in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 8
    Last Post: 20 Feb 2009, 08:43 PM
  5. Member and quantity discount pricing
    By acmfox in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 12
    Last Post: 15 Jan 2009, 05:20 PM

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