Adding item buy links to a Wix.com site
Issue
Standard buy links embedded in a Wix.com site will always return the customer to the home page because the Wix catalog uses hash fragments to provide product catalog mapping.
ResolutionÂ
A Wix.com built websites utilizes a #! tag at the end of the URL. Below are some example URLs from a Wix site:
Page | URL |
---|---|
Home | http://www.caringwisdom.net/ |
Product Group | http://www.caringwisdom.net/#!caringwisdom-products/h9dvb |
Item Page | http://www.caringwisdom.net/#!claylinks-kits/mra5u |
Â
The problem with URLs that use the hash (#) tag at the end is this value does not get sent in the Referer (sic) header sent to the browser. See the screenshot below for an example of the headers on a UCEditor request.
Since the HTTP specification says that the browser will not send the # portion of the URL to the server, we need to manually override the continue shopping URL using the OverrideContinueShoppingURL parameter that can be passed to the UCEditor URL. The easiest way to do this and insure that all the values are properly URL encoded is to use the Advanced Buy Link. Navigate to the folder that contains your item and then click on the links icon.
Now scroll down to the Advanced Buy Link section and perform the following actions.
- Select the StoreFront name from the Host Name drop down
- Check the HTTPS box
- Paste the complete Wix URL into the Override Continue Shopping URL field.
At the bottom of the Advance Buy Link screen (Shown below), the system will automatically generate the proper Advanced Buy Link in the box.Â
Embed that buy link into the product page on your Wix site. Your customer can now add the product to their shopping cart and click continue back to the same page.
Understanding the SEO (Search Engine Optimization) Impact of migrating from one CMS to another.
As a side note, it's important to understand the potential SEO implications of a Wix based site. There is a lot of concern within the industry coming from search people at Google and Microsoft (Bing) about the hashbang (#!) approach. Please read this article:
http://webenso.com/is-wix-seo-friendly/
Make sure to perform standard SEO practices before migrating from one CMS to another.
1) Review the number of pages that are currently in Google. Search "site:yourhost.com" for example to see.
2) Determine how you will send (301) permanent redirects for the old URLs to all of the new URLs on the new site. Never let your content just 404.
3) Your new CMS should generate a sitemap file that can be registered immediately with Google Web Master Tools so that their crawler will be able to quickly observe the site changes.
Frequently Asked Questions
Question: I'm trying to add a dropdown list and add to cart button to Wix. The issue is that HMTL can only be embedded into Wix as an iFrame so when I click on the add to cart button, the shopping cart landing page is stuck in the child frame.  Do you know a way that I can trigger the parent page to go to the shopping cart landing page?
Answer: Insert the form attribute target="_blank" into the form should force it to open into a new windowÂ
<form action="https://secure.ultracart.com/cgi-bin/UCEditor" method="post" target="_blank"> <input type="hidden" name="MERCHANTID" value="DEMO"> <input type="hidden" name="overrideContiinueShoppingUrl" value="http://mywixwebsite.wix.com/"> <select name="ADD"> <option value=>Select Size</option> <option value="718122726455">Sale $49.95 Matte black</option> <option value="718122726653">Sale $49.95 Navy Blue</option> </select> <br> <input name="Add To Cart" type="image" src="https://secure.ultracart.com/cgi-bin/UCGraphic?merchantId=DEMO&Filename=addToCart_ultracart.gif " border="0"> </form>
Related Documentation
Parameters that can be passed to UCEditor
Wix Related Help Docs
https://support.wix.com/en/article/linking-a-button-to-an-external-url