How to pre-fill select shipping method dropdown on step2 of shopify checkout page? - shopify

I guess the title pretty much explains what I want to do.
The thing is we have to provide some options based on the shipping method, so we developed a custom app for that,and provided the options on the checkout page.(Screenshot below)
Now when the user clicks on checkout and goes to the Shopify checkout page, he has to select the shipping method again on step 2 of the checkout page.
So is there a way to prefill the selected shipping method based on the selection made by user??

You cannot program checkout with your own code. So the short answer is probably not.

I ran into this exact issue. Our shop offers free local delivery, or FedEx shipping. If the user selects FedEx shipping on the cart page, "free local delivery" was selected by default on the Shopify checkout page.
I worked around this by creating a bogus product in Shopify called "free delivery". I then used the Shopify cart API to add this item to the user's cart if the user selected local delivery. I set the weight on the "free delivery" product to 1000 lbs. I then set up the "free local delivery" shipping method to be valid for 1000 - 9999 lbs. Regular FedEx delivery is valid for orders up to 999 lbs.
It's a gross hack, but seems to work. The user is still presented with the shipping method drop down on checkout, but only the correct option is available based on the delivery method chosen on the cart page.
Shopify Ajax API (for adding item to cart):
http://docs.shopify.com/support/your-website/themes/can-i-use-ajax-api
Note: I also had to go through some javascript contortions to add a new "updates[]" form field to the cart page when adding the bogus free shipping item to the cart. Without this field, Shopify complained of receiving the wrong number of quantity updates when submitting the cart form.

Related

Add additional charge to PayPal payment button

We have attached a PayPal $4 button in our web application. Now we are planning to add addition charge based on location. So What is the best possibility of add the additional charge to the PayPal check out ? Can I add additional charge to fixed PayPal payment button ?
The answer depends on the type of PayPal button/integration you are using.
If it is a PayPal button rendered using the JS SDK, then you can add an onShippingChange function that calculates a new total based on the selected address.
If it is one of the old "Buy Now" or "Add to Cart" HTML form yellow pill buttons, you can create a shipping profile in the PayPal account.
For other integration types, the web system/cart software communicating with PayPal will need to calculate and change the total after the address is determined.

Shopify Buy Button currency wrong at checkout

I'm trying to get a particular currency to work using Shopify Buy Button.
cart.text.currency works to change the amount to the currency I want, and the checkout etc works fine - amounts are correct. But when I add to cart or indeed go directly to checkout, the prices are in the main currency again.
Is there any directive I can add to the component options to tell Shopify that I want to use the other currency in the checkout? If I visit the store while in Shopify using VPN for that country I am able to checkout in the right currency.

shopify - Gift wrap option for all the products

I am following the instructions mentioned at http://docs.shopify.com/manual/configuration/store-customization/add-a-gift-wrap-option
But what I am trying to achieve is add a gift option to all the products. When trying to do so I am setting up the linked list to link to "All products"
But in cart I am getting message as "You attempted to add a gift-wrapping script to your shopping cart, but it won't work because you don't have a link list with handle gift-wrapping which, in turn, contains a link to your gift-wrapping product. Please " . How can I add the gift cart option to all the items - without creating separate link for each product. Thanks
For this code to work you will need to point your link at the 'Gift Wrap' product, not at 'All Products'. If this still doesn't work, I would suggest revisiting step 2 of the Shopify instructions and make sure your linklist has the correct title and handle.

Prestashop : Adding a field to choose Shipping carrier in product page front office

I'm using PrestaShop 1.5.5.0.
I want to add a custom check box list to the product page so a customer can choose shipping carrier on the product details page. Can it be possible ? I can add a specific fields in the product details page. As I'm new it's little difficult for me to figure out how can I add other details and carry the values to the order page and that is also dynamically. Is there any module available by which I can accomplish the task ? Please suggest me.
What I want to do is this : Choosing shipping carrier in product page :
http://www.wayfair.com/LifeStyle-Solutions-Zurich-Platform-Bed-LS3-ZUR-X-CP-LF1087.html
Well It's a tough task. You need to work on the controller if you want to carry the values or create a module like shipping estimate and hook it to the product page that might work.

BigCommerce Add Products To Cart API

I'm just setting up my first BigCommerce store, and I'd like to know if I can use their API to add products to a shopper's cart and forward them to the checkout page programmatically?
The problem I'm trying to solve is creation of bundles of products in the store. I need to have each product in a bundle show up as a separate line item and sku on the order, but BigCommerce does not natively support this. The next best thing I can think of is to send the user to a specially crafted php page that will add the constituent parts to their cart, then forward them to the checkout page.
Am I barking up the wrong tree? Is there a simple way to do this that I've missed?
You can use the Cart api to
- Create cart
https://developer.bigcommerce.com/api/v3/cart.html#post-carts
and use the created cart id to
Generate cart URL
https://developer.bigcommerce.com/api/v3/cart.html#post-carts-cartid-redirect_urls
Then you can move the user to this url