Results 1 to 10 of 3052

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Posts
    356
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    After upgrading to the new Square_webPay 1.2.1 I found a bug in (I think) OPC. While checking out and paying with Square_webPay, OR check/money order but NOT Paypal Restfull, If I change what's in the special Instructions or Comments field (or whatever 'TABLE_HEADING_COMMENTS' was defined to originally) I get the error "Your orders details have changed. Please review the current values and re-submit. I had had trouble with this previously with paypal, but not connected it to the comments field.
    ZenCart - 1.5.8a
    Bootstrap - 3.6.0
    OPC - 2.5.1
    Square_webPay (paid version) - 1.2.1
    PayPal Checkout (RESTful) - 1.0.2

    Hoping to upgrade OCP to 2.5.2 today, will post if it still happens in that version.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  2. #2
    Join Date
    Jun 2005
    Posts
    356
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Lol, NM, I should have just trusted in lat9! 2.5.2 DOES in fact fix that prob! Thank you Cindy!!!!
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by gothstone View Post
    Lol, NM, I should have just trusted in lat9! 2.5.2 DOES in fact fix that prob! Thank you Cindy!!!!
    Most excellent!

  4. #4
    Join Date
    Jun 2012
    Posts
    481
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Cindy,
    I've been trying out OPC with guest checkout and it works great. But I'd like to apply the group discount to certain guests. I've set up an observer to check if a guest customer should get a discount when the guest enters their name and address. If so, I set the group_pricing field in the customers table for the special "do not remove" guest customers_id, expecting that during checkout, the group pricing order total module will calculate the discount and apply the discount. And although the table has been modified, the group pricing module is never called during guest checkout. The discount is applied to normal logged in customers in the group. Thoughts?
    Thanks!
    Dave
    Last edited by Dave224; 10 Jul 2024 at 04:10 PM.

  5. #5
    Join Date
    Jun 2012
    Posts
    481
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by Dave224 View Post
    Cindy,
    I've been trying out OPC with guest checkout and it works great. But I'd like to apply the group discount to certain guests. I've set up an observer to check if a guest customer should get a discount when the guest enters their name and address. If so, I set the group_pricing field in the customers table for the special "do not remove" guest customers_id, expecting that during checkout, the group pricing order total module will calculate the discount and apply the discount. And although the table has been modified, the group pricing module is never called during guest checkout. The discount is applied to normal logged in customers in the group. Thoughts?
    Thanks!
    Dave
    Ok, I see. ot_group_pricing excludes guests.
    Code:
            if ($order->info['total'] == 0 || !zen_is_logged_in() || zen_in_guest_checkout()) {
                return;
            }
    Dave

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by Dave224 View Post
    Cindy,
    I've been trying out OPC with guest checkout and it works great. But I'd like to apply the group discount to certain guests. I've set up an observer to check if a guest customer should get a discount when the guest enters their name and address. If so, I set the group_pricing field in the customers table for the special "do not remove" guest customers_id, expecting that during checkout, the group pricing order total module will calculate the discount and apply the discount. And although the table has been modified, the group pricing module is never called during guest checkout. The discount is applied to normal logged in customers in the group. Thoughts?
    Thanks!
    Dave
    What notification is the observer watching? I'll note that doing that on-customer update to the guest customer's database record could wind up giving the discount to the "wrong" person.

    You might be better off adding a notification to ot_group_pricing's calculate_deductions method (in the check for guest-checkout, towards the top) and simply override the returned array there.

  7. #7
    Join Date
    Jun 2012
    Posts
    481
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    What notification is the observer watching? I'll note that doing that on-customer update to the guest customer's database record could wind up giving the discount to the "wrong" person.

    You might be better off adding a notification to ot_group_pricing's calculate_deductions method (in the check for guest-checkout, towards the top) and simply override the returned array there.
    The notifier I'm using is NOTIFIER_CART_GET_PRODUCTS_START with checks on presence of $_SESSION['opc'], $_SESSION['opc']->isGuestCheckout() === true, and $_SESSION['opc']->getAddressLabelFields for the guest billing address. All this to get the first notifier occurrence after the guest's name and address is entered. This is followed by checks on the name and address against a separate table of customers who get discounts. Then the guest customer entry in table customers is updated with the guests pricing group. Finally, there's some code to set a $_SESSION variable to check to prevent repeating the processing for subsequent notifications because I couldn't get the detach notifier method to work. If the guest does not get a discount, the guest entry in table customers is returned to it's default. Not the easiest notifier, but it's the only one I could find to work with.

    I think I see what you're suggesting. Basically, set the guest entry in the customer table to any pricing group so that ot_group_pricing calculates the discount, followed by checks there to see if the discount is valid for the current customer or guest and override if not valid. I would still have to eliminate the check on zen_in_guest_checkout() in method process in ot_group_pricing. Am I correct in understanding your suggestion?

    Dave

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by Dave224 View Post
    The notifier I'm using is NOTIFIER_CART_GET_PRODUCTS_START with checks on presence of $_SESSION['opc'], $_SESSION['opc']->isGuestCheckout() === true, and $_SESSION['opc']->getAddressLabelFields for the guest billing address. All this to get the first notifier occurrence after the guest's name and address is entered. This is followed by checks on the name and address against a separate table of customers who get discounts. Then the guest customer entry in table customers is updated with the guests pricing group. Finally, there's some code to set a $_SESSION variable to check to prevent repeating the processing for subsequent notifications because I couldn't get the detach notifier method to work. If the guest does not get a discount, the guest entry in table customers is returned to it's default. Not the easiest notifier, but it's the only one I could find to work with.

    I think I see what you're suggesting. Basically, set the guest entry in the customer table to any pricing group so that ot_group_pricing calculates the discount, followed by checks there to see if the discount is valid for the current customer or guest and override if not valid. I would still have to eliminate the check on zen_in_guest_checkout() in method process in ot_group_pricing. Am I correct in understanding your suggestion?

    Dave
    What I'm suggesting is to add a notification in /includes/modules/order_total/ot_group_pricing.php's calculate_deductions method:
    Code:
        if ($order_total == 0 || !zen_is_logged_in() || zen_in_guest_checkout()) {
            global $zco_notifier;
            $zco_notifier->notify('NOTIFY_OT_GROUP_PRICING_DEDUCTION_OVERRIDE', ['order_total' => $order_total], $od_amount);
            return $od_amount;
        }
    Your observer would watch for that notification and, if the 'order_total' isn't 0 and zen_in_guest_checkout() returns (bool)true, would check for the guest customer that you're looking to provide the deduction for and 'fill in' the $od_amount array with the discount information.

 

 

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 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