The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

SSO v1.1 - Pull Shipping Addresses from MODX prior to checkout screen

Maybe I am missing something key in the documentation.

I need to pull a list of saved addresses a customer has in my MODX site prior to the Checkout page loading. With JQuery, I am going to process these into a typeahead select box so that the user can choose which of their saved addresses to ship the order (no MultiShip, each checkout can only go to one address).

Some clients have a lot of addresses, so much that it errors out any attempt to make a cookie of the addresses, so I cannot pass them through cookies.

How do I pass the array of addresses as a hidden custom field using a PHP endpoint? I see how to check Authentication in the SSO php endpoint, but I am having trouble figuring out how to send along the custom data from a PHP script.
  • fc_adamfc_adam FoxyCart Team
    edited February 2016

    You could add them as hidden session attributes on your own site - and they'll then come through with the cart session on the checkout. You can add hidden session attributes using a normal add to cart style link or form - and just prepending the session attributes with h:.

    You could also dynamically request them on the checkout using ajax - but you'll need to ensure your endpoint is secured with SSL to allow secure communication between the checkout and your endpoint.
  • I just read that there might be a character limit on custom fields, is this correct? Some of these users have this particular custom field pretty full (on user has 300 addresses in their shipto on my site) so my concern is will that much data be able to be stored in a custom field.
  • fc_adamfc_adam FoxyCart Team

    Good question. I'll need to confirm that with the team, but I believe they share the same limit as the custom product options - 100 characters for the name and 1024 characters for the value. You could add each individual address it's own custom attribute as well. As an aside - 300 addresses is a crazy amount of addresses!
  • Tell me about it. most of the customers for this store have around 5... 3 customers are distributors so they have 300 - 400. Poor user experience for those few customers, but my main concern is getting those addresses from MODX to FoxyCart
Sign In or Register to comment.