Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

One Page Checkout - Javascript address vars

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 01-10-2018, 03:13 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default One Page Checkout - Javascript address vars

Hi!

I'm currently working on a mod for our customers to choose a Pickup Point for their parcels.
However, I'd like to pass the zipcode that the customer has filled in on his address, to the call that opens the Pickup Point Chooser-Window.

So what I'm looking for, is a javascript variable that contains the zipcode of the customer.
Is there such a variable?

Location:
cart.php?mode=checkout

So the customer has already filled in his/her address and can now choose a payment method + shipping method. An extra button has been implemented, that will open a window that will let the customer choose a Pickup location for whatever parcel service he/she chooses.


Is there such a Javascript variable on the checkout page?
__________________
X-Cart 4.7.12
Reply With Quote
  #2  
Old 01-10-2018, 02:36 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: One Page Checkout - Javascript address vars

I'm not seeing one. You may have to create your own like:
Code:
<script> var ppZip = '{$userinfo.s_zipcode}'; </script>
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following 3 users thank cherie for this useful post:
elmirage001 (01-11-2018), herber@wirehub.nl (01-11-2018), qualiteam (01-17-2018)
  #3  
Old 01-11-2018, 02:49 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Re: One Page Checkout - Javascript address vars

Quote:
Originally Posted by cherie
I'm not seeing one. You may have to create your own like:
Code:
<script> var ppZip = '{$userinfo.s_zipcode}'; </script>
Thank you!
That is exactly what I'm looking for, placing $userinfo.s_zipcode in a JS variable has solved my problem.
Now I can pass this variable to the Pickup Point Chooser-popup window & customers will immediately see the Pickup Points near them.
__________________
X-Cart 4.7.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:29 AM.

   

 
X-Cart forums © 2001-2020