[Resolved] Shipping Calculator

New Member
3 0 0

Hi 

I am using venture theme and the shipping calculator is not working. It is not generating any rates after clicking the button.

Please help me out.

Regards

Avata

0 Likes
New Member
5 0 0

I am also using the Venture theme and have my shipping calculator working now. Add the following code

{{ '//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js' | script_tag }}

in your theme.liquid file. I placed mine just belore the ending head tag. Looks like the following.

{% if template contains 'customers' %}
    {{ 'shopify_common.js' | shopify_asset_url | script_tag }}
  {% endif %}
  
  {{ '//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js' | script_tag }}
  
</head>

I hope this helps.

Brian
  
 

0 Likes
New Member
3 0 0

Hi Brian,

Thanks a lot for your reply.I tried your solution.

But unfortunately it did'nt work for me.

Regards

Avata

0 Likes
New Member
3 0 0

Hello, 

I am using the lauchpad-star theme and have never been able to successfully install the calculator - when clicking "calculate rate" the button doesn't return any shipping rates. 

If any one could enlighten me as to why this might be happening I would be very grateful?

Many thanks

Julia

0 Likes
New Member
22 0 0

Hello everybody, hello our saver Caroline,

I see after some css changing in our code, that the Shipping-rate calc works well, but doesn't take care of the postal code entered: If I put 0 or even just text, he print the shpping costs for the country. It's not a problem but if the condition exists, it's better to run it. It doesn't do this before.

http://www.claves.ch/cart

Did someone met this problem before? If I leave the postal code blank, he asks that he can't be blank. I surely should have done an error somewhere. But after checking, I have difficulties to fix it.

Thank you in advance for your precious help.

(I know my code is not the best, but I'm starting to handle better with the liquid code. It was a long time I didn't code some. Sorry)

0 Likes
Shopify Partner
19 0 2

Hello,

I use Decimal for my shipping rates.  USPS and my In-Store Pickup shows, but FedEx does not show in the calculator. Can someone lead me in the right direction?
Thank you in advance for any help.

0 Likes
New Member
1 0 0

Dear lovely people, 

I know nothing about coding but the shopify guide was super clear. I'm using a sectioned theme and did as told but nothing is happening at my cart. I really want the estimator in the shopping cart please. I hope someone would be kind enough to give their expert opinion. Our site is at planetlocal.co

Best regards, 
Raju

0 Likes
Shopify Partner
17 0 2

The calculator was not working for me either. I am using the Minimal theme as someone mentioned above. However, I was able to get it working after reading the documentation VERY carefully at least 5 times.

https://help.shopify.com/themes/customization/cart/add-shipping-calculator#sectioned-themes

I am using a sectioned theme which does not have a vendor.js file, only theme.js.  

There is a spot in the doc that is particularly tricky and is where my mistake occured:

 

To the very bottom of vendor.js, paste this code hosted on GitHub. If you are editing theme.js instead, then paste the same code snippet at the very top of the file.

I pasted the Caroline's code from Git at the bottom of the theme.js, not the TOP as described above. This caused the calculator to do nothing when clicking the Get Rates button, however, it also did not create errors in the Chrome debug console. A real pain.

The next step tells you to paste a chunk of code at the very bottom of the same file (theme.js),  

In the Assets directory, click theme.js. To the very bottom of the file, paste the following code:

Shopify.Cart.ShippingCalculator.show( {
  submitButton: theme.strings.shippingCalcSubmitButton,
  submitButtonDisabled: theme.strings.shippingCalcSubmitButtonDisabled,
  customerIsLoggedIn: theme.strings.shippingCalcCustomerIsLoggedIn,
  moneyFormat: theme.strings.shippingCalcMoneyFormat                                     
} );

 

To wrap things up

If your theme is using theme.js and is sectioned, you need to paste two separate pieces of code in the same file, one at the top and on at the bottom

I hope this helps!

 

 

 

1 Like
Highlighted
Tourist
12 0 2

I'm using a 3rd party sectioned theme and can't get it to work.  I don't have a theme.js or a vendor.js.  The only one remotely similar is a vendor.min.js.   I've done it on other 3rd patry none sectioned themes and it works flawlessly, just not on this particul theme.  Any advice?

Here's a list of the files in me Assets folder. (view attached picture)

Thanks in advance

Stephan

0 Likes
Shopify Partner
17 0 2

Hi Stephan,

Vendor.min.js is the Vendor.js file, only minified. Hence the .min in the filename.

You can open that file and un-minify it with something like unminify so you can read it easier. Place your code where described in the tutorial and save. Then re-minify and reupload.

I hope that helps!

0 Likes