Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Can Anyone Help Me Make a Simple "Credit Account" Mod?

    I have looked about any haven’t found anything basic that seems to do this. There is a mod that has the functionality but it changes way more stuff than I need.

    Basically I want to develop a simple mod to the customers info page within the admin, whereby I can have an input field with a go button which when you enter a value in and hit go it adds that value to the customers GV balance and (not essential) but prefereably emails the customer to alert them that credit has been added to their account.

    The reason for this is that I would like to apply credit rather than emailing a GV code for the customer to fill in and additionally be able select the customer based on their order id.
    So a customer places an order. I then want to add credit to the account which placed order #1234. So I go to order #1234, select the customer details, which brings up the customers.php with the customer highlighted, then on the right there is the box that has the following:

    [EDIT] [DELETE]
    [ORDERS] [EMAIL]
    Account Created: 11/26/2012
    Last Modified: 12/30/2012
    Last Logon: 01/07/2013
    Number of Logons: 10
    GV Balance £833.64
    Number of Orders: 6
    Last Order: 01/07/2013
    Total: £0.00
    Country: United Kingdom
    Number of Reviews: 0
    Customer Referral
    1st Discount Coupon

    What I would like to do is add above the GV Balance £833.64 something like this:

    Add Credit [INTPUT FIELD] [GO BUTTON]

    Then, once it’s clicked the GV Balance will now be updated with the new balance.

    I find having to find the email address of a customer from their order, then going to gv_mail.php then trying to find that email on the drop down list is a bit of a pig.

    If there is a mod that does exactly this can someone point me in the right direction?

    If not, then does anyone know a simple way this can be achieved? is it a simple case of adding switch cases to the customers page code to run the db query?

    Ta,
    Phil Rogers
    A problem shared is a problem solved.

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    So starting to look at the sql logic, so heres what i'm thinking for the sql:

    SELECT EXISTS(SELECT * FROM `coupon_gv_customer` WHERE `customer_id` = 5170)

    then if the result is 1 do this:
    UPDATE coupon_gv_customer SET amount = amount + $_POST WHERE customer_id = $customer_id

    if the result is 0 do this:
    INSERT INTO coupon_gv_customer (amount, customer_id) ($_POST, $customer_id)

    Does that sound right?
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Quote Originally Posted by philip937 View Post
    Basically I want to develop a simple mod to the customers info page within the admin, whereby I can have an input field with a go button which when you enter a value in and hit go it adds that value to the customers GV balance and (not essential) but prefereably emails the customer to alert them that credit has been added to their account.

    The reason for this is that I would like to apply credit rather than emailing a GV code for the customer to fill in and additionally be able select the customer based on their order id.
    Is this intended for handling returns? Or something else?
    If it's for returns, it would make smarter sense to do this in a plugin that takes into account the many other things involved in a return also.
    .

    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.

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Is this intended for handling returns? Or something else?
    If it's for returns, it would make smarter sense to do this in a plugin that takes into account the many other things involved in a return also.
    No nothing to do with returns. Simply rewarding customers with credit. The customers to be rewarded will be identified to me by their order id so I will be looking up the order, then selecting the customer by clicking the customer details icon. From there I want to be able to apply credit to the GV balance.
    Phil Rogers
    A problem shared is a problem solved.

  5. #5
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Dr Byte, i've started looking at the customers.php file and im a little lost if i'm honest.

    I am assuming that i need to add my input feild and button somewhere which links to a new switch action? and for that case to run the db query based on the customer_id & value in the input field?

    Would you be kind enough to point me in the right direction/area of code and i'll see how far I can get from there?

    Many thanks,
    Phil Rogers
    A problem shared is a problem solved.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Why not use the built-in gift voucher utility?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Quote Originally Posted by swguy View Post
    Why not use the built-in gift voucher utility?
    swguy, mainly because trying to find a customer from the drop down list of thousands of emails is next to impossible. Also from memory dont the reciprients have to apply the voucher too?

    I want to achieve two things really.

    1. be able to apply credit from a customers account information view/ customers view
    2. want the credit to apply instantly without them having to apply it themselves.

    any thoughts?
    Phil Rogers
    A problem shared is a problem solved.

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Use the built-in gift voucher utility. Enter his name in the Email To field. Yes, you would have to give up point 2, but my suggested solution doesn't involve writing a bunch of software.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  9. #9
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    I guess a alternate solution (IF ITS POSSIBLE) would be to have a link to the gv page from the customers info page which sets a param which pre selects their email from the drop down?

    still don't like the idea of them havin to apply the credit though as what I am doing is adding credit not offering a voucher as such.
    Phil Rogers
    A problem shared is a problem solved.

  10. #10
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Can Anyone Help Me Make a Simple "Credit Account" Mod?

    Quote Originally Posted by swguy View Post
    Use the built-in gift voucher utility. Enter his name in the Email To field. Yes, you would have to give up point 2, but my suggested solution doesn't involve writing a bunch of software.
    Why does anyone make mods?

    To get zen cart to do something that it doesn't already offer.

    I want to be able to credit accounts not send gift vouchers so I guess that's why I don't want to use the send gift voucher facility to add the credit.

    I shall carry on scratching my head here.
    Phil Rogers
    A problem shared is a problem solved.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 83
    Last Post: 8 Jun 2023, 06:59 PM
  2. Replies: 1
    Last Post: 10 Aug 2011, 02:07 AM
  3. Can I make all "add: 0" input boxes on product pages to "more info..."?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2009, 06:05 PM
  4. Anyone successful make the "Group Pricing (Per Item)" & "MSRP Display" togther?
    By explorer1979 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Dec 2008, 08:37 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