I just made up this gist from the custom code I’m using in my switcher. Note that I’m using a modified version of the original script, so it may require some adjustments, but this is the basic idea.
Essentially, in addition to the normal elements in the theme array, I’ve defined a preview image URL and a product type. These are then added in the loop, and styled appropriately. Note that I’ve got it set up so that you can use a relative path (in which case, preview images would be stored in a directory ‘product_previews’), or absolute paths.
You can view my item demos to see the results.
Hope that helps!
Chris
Sorry me again! How do you style the type : ‘type’=> “Responsive HTML5”?
That’s the bit I’m stuck on!
I just made up this gist from the custom code I’m using in my switcher. Note that I’m using a modified version of the original script, so it may require some adjustments, but this is the basic idea.
Essentially, in addition to the normal elements in the theme array, I’ve defined a preview image URL and a product type. These are then added in the loop, and styled appropriately. Note that I’ve got it set up so that you can use a relative path (in which case, preview images would be stored in a directory ‘product_previews’), or absolute paths.
You can view my item demos to see the results.
Hope that helps!
Chris
Sorry me again! How do you style the type : ‘type’=> “Responsive HTML5”?
That’s the bit I’m stuck on!
I edited the gist to add the product type style. It’s just positioned absolutely positioned to the right and given a background
I just made up this gist from the custom code I’m using in my switcher. Note that I’m using a modified version of the original script, so it may require some adjustments, but this is the basic idea.
Essentially, in addition to the normal elements in the theme array, I’ve defined a preview image URL and a product type. These are then added in the loop, and styled appropriately. Note that I’ve got it set up so that you can use a relative path (in which case, preview images would be stored in a directory ‘product_previews’), or absolute paths.
You can view my item demos to see the results.
Hope that helps!
Chris
Thanks a million, you made this item switcher complete.
Hi there, Today I created a file switcher that might be of use the envato community. Basically it removes the preview frame automatically. Then replaces it with a custom item switcher.
Demo
For a demo view one of my items (i cant post links here sorry).
Firstly unzip and place the folder on your server. Place it in a directory like this: http://themes.yoursite.com/ - Though make sure its a new directory with nothing else in so you can use the root of the folder as the url.
Open index.php and you will see a php array called $theme_array. You dont have to know php. For every item you create a new array like below:
Seems that it’s working only the first time when you remove the frame. If you go after to another location and try to remove the frame then you are redirected to the home page.
If you’ve noticed when you first load the preview, the styles are loaded nicely and the user can switch between theme styles. However if the user selects a different theme, I’m not able to load the php array list of the selected theme via js.
What I’ve done for the styles is add it as part of the array of the theme list - that kinda makes it hard for me to pull the list using javascript, obviously due to my limited knowledge in php/js. At the moment am just setting the styles list of the selected theme to blank to avoid the previous list from being visible.
I’d appreciate some help from any one on how to load the list of styles from the php array to the javascript on click event.