Error redirecting to checkout

Shopify Partner
14 0 1
var checkoutData = 'checkout[shipping_address][first_name]=' + encodeURIComponent(studentfirstname) + 
            '&checkout[shipping_address][last_name]=' + encodeURIComponent(studentlastname) + '&checkout[shipping_address][zip]=' 
        		+ encodeURIComponent(zipCodeInput) + '&checkout[shipping_address][country]=United%20Kingdom' + 
            		'&checkout[shipping_address][address1]=' + encodeURIComponent(shippingAdress1 + " " + shippingAdress2) + 
            			'&checkout[shipping_address][city]=' + encodeURIComponent(cityInput);
        var goCheckOut = mainURL + "/checkout?" +  checkoutData;
        window.location.replace(goCheckOut);

 

I had this sample code on a JS file for the cart view, so I could redirect the user to the checkout with some of the form fields filled up already.

An example of what goCheckOut var would turn out to be is: 
https://www.unikitout.com/checkout?checkout[shipping_address][first_name]=Peter&checkout[shipping_ad...

But for some reason shopify is not allowing it anymore? Instead of redirecting I now get this message: 

"Oops, something went wrong.

What happened?

expected String to be a Hash: checkout: expected String to be a Hash: checkout"

Does anybody has any idea why is this happening?

0 Likes
Highlighted
Shopify Partner
38 0 0

Did you figure out what the problem was?

0 Likes
Shopify Partner
14 0 1

Nope, it just started to work again on its own.. I guess it was a shopify internal bug.

0 Likes