| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Product Options and Image previews - any ideas? | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Product Options and Image previews - any ideas?
OK. this is far too challenging for a Friday evening, but I can't find any existing threads that relate to it, so here goes...
The Problem: -The site i'm putting together sells 'wedding stationery'. - For each item of stationery, you can select one of 10 'typefaces' for the message in your stationery - This typeface selection is implemented using the Product Options label, in my test XC install. Something like this: http://www.ocpx.com/images/temp/product_pre.png However..... - What i'd like to do is include a 'preview' capability, so when you select a typeface from the dropdown, you also see a preview next to the drop down of the typeface you're selecting. Something like this: http://www.ocpx.com/images/temp/product_post.png - I've already implemented this on a static site (http://www.jellyfishdesigns.com/contact_us.shtml - see the 'Design for these samples' dropdown at the bottom) that uses this script: Code:
The advice i'm after is: - Is there any way to implement this in XC using the default Product Options module and hacking away at tpl's (i.e. without touching any core files)? I've compared the preview script on the static site, but this looks horrendously difficult to implement as Xc allocates a unique 'po{$v.classid}' in 'Modules/Product_Options/customer_options.tpl'. Any thoughts from you XC experts out there? Cheers
__________________
X-Cart 4.0.17 ezUpsell PHP 4.4.1 MySQL 4.0.25-standard Apache 1.3.34 Linux |
|||||||
#2
|
|||||||
|
|||||||
This mod has been in demand for quite a while now, and I don't believe it has been implemented yet. It would indeed be a great addition to X-Cart.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Anyone else have a need for this functionality?
cheers,
__________________
X-Cart 4.0.17 ezUpsell PHP 4.4.1 MySQL 4.0.25-standard Apache 1.3.34 Linux |
|||||||
#4
|
|||||||
|
|||||||
Like I said, there is a large demand for a mod like this. A developer could make some good money if they coded it
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
This is quite easy to do actually.
Take a look at www.lastangelsonearth.co.uk/heavenly/product.php?productid=1019 In my case I am replacing the main image when you select a colour from the dropdown. Basically the skin1/modules/Product_Options/check_options.tpl file has everything you need (only there is a minor flaw in the code -- probably cos they want to charge you to fix it!!) I changed this: Code:
to this: Code:
Then in product.tpl you need your "typeface" image to have an id of "product_thumbnail" - in my case (because I am changing the main image) I used this Code:
but you could have a separate image which has an id of "product_thumbnail" with its own size properties etc Then all you need to do is to add some additional entries to your "xcart_thumbnails" table for each productid/variantid variation - each typeface would have the "image_path" and "variantid" field set accordingly (I have used phpMyAdmin to do this so far as i have not got around to making proper changes to my administration yet) et voila !! only downside from your viewpoint is that you need to add image entries to the database for each product/variant combination (not just a single image for each variant typeface) but works nonetheless
__________________
4.0.12 Linux |
|||||||
#6
|
|||||||
|
|||||||
color jpgs by color options
hello, is it possible to do what this site is doing http://www.bigandtallworld.com/imagefolio/scripts/imageFolio.cgi?action=view&link=T-Shirts_Muscles_Tanks_a...image=8650.jpg i would like this feature and possibly others will too
__________________
Version Installed: X-CART 4.0.13 Litecommerce 2.1 Addons Installed: Advanced Order Management RMA |
|||||||
#7
|
|||||||
|
|||||||
It seems feasible but is way outside the boundaries of this thread. I guess you need to ask x-cart for a quote.
Actually there is another example discussed on these forums which takes into account the stock levels as well (and in that case I would be interested) - here is the actual site http://www.justhom.com/HOM-H01-light-micro-pr-106.html
__________________
4.0.12 Linux |
|||||||
#8
|
|||||||
|
|||||||
Hi ianwebster,
Quote:
This sounds like a pretty good interim solution - any chance you could explain the above a bit more? Many thanks,
__________________
X-Cart 4.0.17 ezUpsell PHP 4.4.1 MySQL 4.0.25-standard Apache 1.3.34 Linux |
|||||||
#9
|
|||||||
|
|||||||
This is the structure for your xcart_thumbnails table:
Code:
The xcart programmers have kindly organised things so we can have more than one entry for a product (each with the same productid but a different variantid) the variantid is an id they have allocated for a unique variant of a product (in your case each typeface in that style). I have changed my product_variants.tpl file so I can easily see these variantids. add a new column as follows: Code:
Obviously it would be nice if you could add extra entries to the xcart_thumbnails table using the administration interface but I havent got around to doing that part on mine yet. However, you can manually add a new entry in the xcart_thumbnails table for each product/typeface combination. For arguments sake, lets say your "Anya Evening Invitations" product has an id of 16153. There should already be an entry in the xcart_thumbnails table where the productid is 16153 and the variantid is 0 (this will be your default thumbnail which is entered by the existing administration interface) Now you need to add another entry for each typeface that is available in the "Anya Evening Invitations" range ie make a new entry with productid = 16153 and variantid = whatever the variantid is for your "typeface 01" - the path to your typeface graphic will depend on where you are storing your images (i am assuming that you are not using blobs). Then add new entries for each additional typeface in that range. Caveat -- some parts of the standard xcart code can be quite draconian about removing stuff from the xcart_thumbnails table if you make radical changes to your variant setup after doing all this manually - i am currently making changes to some of the administration files so that 1) you can add images directly in the admin and 2) so their code is less brutal -- but dont hold your breath cos this manual technique has worked well for me and so these changes to the admin are not that high on my priority list
__________________
4.0.12 Linux |
|||||||
#10
|
|||||||
|
|||||||
Ok here are the changes you need to make to your admin. If you have a lot of products then I think you will still be better off uploading an sql file into your xcart_thumbnails table to make the additions in bulk
My product_variants.tpl now looks like this Code:
In image_selection.php add this new line Code:
Also in image_selection.php, add this line Code:
In popup_image_selection.tpl, add this after the other hidden form fields Code:
Add this new function to popup_image_selection_js.tpl Code:
Add this to product_variants.php Code:
That deals with the administration for variant thumbnails (and my variant screen now looks like this) http://www.lastangelsonearth.co.uk/heavenly/product_variants.jpg But there are a couple of things to stop all our good work being rubbed out by other xcart code elsewhere so we need to change product_modify.php Code:
And we need to change product_details.tpl Code:
__________________
4.0.12 Linux |
|||||||
|
|||
X-Cart forums © 2001-2020
|