Need Help with AusPost Collections Widget Integration

Highlighted
New Member
5 0 0

I am currently trying to integrate an AusPost Collection Widget into my checkout.

The widget is already functioning correctly, however.. The address lines in checkout is not being auto filled when an address is "selected" in the AusPost widget.

Documentation says it will auto fill the address once an address is "selected" in the AusPost Widget.

 

Here is the code that I have in my checkout.liquid file. Can someone help me with this?

Any help would be appreciated.

 

    <!-- AusPost Collect Widget Script --> 
    <script src="https://test.collect.auspost.com.au/LocationFinder.min.js"></script>
    <script type="text/javascript">
      const cb = (storeAddress) => { 
                storeAddress = {
                    StoreId:  	'storeDetails.storeId',
                      Line1:    'storeDetails.storeAddress1',
                      Line2:    'storeDetails.storeAddress2',
                      City:     'storeDetails.storeCity',
                      County:   'storeDetails.storeState',
                      Postcode: 'storeDetails.storePostCode'
                  }
        console.log('cb', storeAddress);
          $("#checkout_shipping_address_address1").val(storeDetails.storeAddress1).prop('disabled', true);
          $("#checkout_shipping_address_address2").val(storeDetails.storeAddress2).prop('disabled', true);
          $("#checkout_shipping_address_city").val(storeDetails.storeCity).prop('disabled', true);
          $("#checkout_shipping_address_zip").val(storeDetails.storePostCode).prop('disabled', true);
          $("#checkout_shipping_address_province").val(storeDetails.storeState).prop('disabled', true);
          $("#checkout_shipping_address_country").val("Australia").prop('disabled', true);
      }
      try { LocationFinder.init({ 
        root: 'auspost-widget', 
        apiKey: 'HNI5G41AEMNLETXV01P4FFIF2IDEY53S', 
        apiSecret: '***my API Key ***', 
        googleApiKey: '*** my Google API Key ***', 
        merchantId: '*** my Merchant ID ***', 
        emailInputId: 'checkout_email_or_phone', 
        callback: cb 
      }); }
      catch { console.warn('Location Finder Library not available') }
    </script>

 

 

0 Likes
Highlighted
New Member
12 0 0

Hello,

Trust you're keeping good.

Surely, can assist you on your requirements.

Please Reach me on my Email- Trish@cisinlabs.com                   

 Regards,

Trish

0 Likes
Highlighted
Trailblazer
380 15 14

Hi @AugustJr 

I hope you're doing great!

I would be happy to work with you. Please give me a suitable time to discuss your requirements.

Also, add me over Skype id- live:jennifer.wcoast or Email- sales@wreximinfotech.com

I look forward to your response!

Stay Well

Thanks!

0 Likes
Highlighted
Shopify Partner
2471 128 403

@AugustJr I can debug the checkout for you and see if the app widget is doing what it says it's supposed to be doing.

Note - shopify store previews do not have a checkout process.

Contact me at paull.newton+shopifyforums@gmail.com with details for pricing.

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes