what is the Widget Code for in V4?

Probably a stupid question, but what is the Widget Code for in 4.0.3 :confused:

You can embed your store into any webpage. ie wordpress.

OH! That’s pretty cool! 8)

I've been messing around with it and i just can't get it to work properly. How do you get it to come up with the two different layouts? It doesn't matter which layout you specified in the JavaScript it all so changes the main shop one.



i.e



If you ask it to fall out layouts 2 on a specific site you go back to your site and it's also change to layout 2 there!



My i doing something wrong or is this just another feature that doesn't work?

Hi

I am not sure if this is the same issue as me, as I am using multi vendor. but I put in a Bug Report on this a few weeks ago and the solution was posted today after I bumped it to the top of the pile again.

http://forum.cs-cart…displayed-site/



Also

The way to use the widget code is to create a new layout, but you do not need to select it as default.

you just need to go to that layout in admin and cut the widget code from that layout.

the only real difference will the the layout number in this line

“cw.src = unescape(url) + '/js/tygh/init.js?layout=2';”

You can modify the new layout and the changes will show.



Regards

Alan

i worked this one out already, the problem is that if i change [font=“arial, verdana, tahoma, sans-serif”][color=“#282828”][size=3]“&” with “&”, then it will work, but if i go to my shop it all changed it there to that layout. i want it to change just where i but the widget code and not my shop to.[/size][/color][/font]

[quote name='projectmyst' timestamp='1393026777' post='177984']

i worked this one out already, the problem is that if i change [font=“arial, verdana, tahoma, sans-serif”][color=#282828][size=3]“&” with “&”, then it will work, but if i go to my shop it all changed it there to that layout. i want it to change just where i but the widget code and not my shop to.[/size][/color][/font]

[/quote]

You need to go into add layout and click + add layout, select the new layout, but do not make it default. Modify the new layout and cut and paste the widget code from the new layout.



Alan

Hi Takestock



Thanks for pointing that to me, put i know how to set it up, i have done all you said above over and over.



Let me be a bit more clear, this is the issue:



I have my main layout (layout 1) as default, now i create layout 2 with out selecting “make default layout” option, i copy the widget code and paste it where ever i want it to display layout 2, now if i go to my shop its still the default layout (layout 1), i then go to the website to where i pasted the code and it works with layout 2, now if i go back to my shop its change it to layout 2.

[quote name='projectmyst' timestamp='1393194563' post='178064']

Hi Takestock



Thanks for pointing that to me, put i know how to set it up, i have done all you said above over and over.



Let me be a bit more clear, this is the issue:



I have my main layout (layout 1) as default, now i create layout 2 with out selecting “make default layout” option, i copy the widget code and paste it where ever i want it to display layout 2, now if i go to my shop its still the default layout (layout 1), i then go to the website to where i pasted the code and it works with layout 2, now if i go back to my shop its change it to layout 2.

[/quote]

HI

I had much the same problem, It seems that once you access the page that the widget is shown on, you can no longer visit the main site and see the default layout, Clearing the browser cache does not work. It's almost as if it is being saved in a cookie.

but you site is not changed.

You will need to completely clear all browser history. Or use a different browser or device. You will see that your main site layout has not changed.



Alan