BuyItSellIt Community
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



How to make variant pictures work??? Expand / Collapse
Author
Message
Posted 6/3/2008 10:35:50 PM


BISI Guru

BISI GuruBISI GuruBISI GuruBISI GuruBISI GuruBISI GuruBISI GuruBISI Guru

Group: Forum Members
Last Login: Today @ 9:03:21 PM
Posts: 249, Visits: 503
Hello Tomas...

I guess I missed this up until now when a customer mentioned that the changing of variant images is not working. I have the call for the script in there but the variant images are not changing. I did ensure that the customer does have variant images assigned to each variant.

I guess I am asking if there is any special code I need to use?

Here is what is in the header...

 <link rel="stylesheet" href="/Templates/lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="/_js/prototype.js"></script>
    <script type="text/javascript" src="/_js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="/_js/lightbox.js"></script>
 <script type="text/javascript" src="/_js/productdetails.js"></script>

Here is what is in the body of the product details...

<div id="photos">
       <!--#if($DefaultImageID != "0")-->
    <a href="$DefaultImageURLFull" rel="lightbox[productphotos]"><img src="$DefaultImageURL290px" alt="$ProductTitle" id="product-full"/></a>
    <!--#end-->
    
    <div id="photo-thumbs">
    <!--#foreach($Image in $ProductImages)-->
     <a href="$Image.URLFull" rel="lightbox[productphotos]"><img src="$Image.URL80px" alt="ProductTitle" /></a>
       <!--#end-->
    </div>
   </div>
            <form method="post" action="">
   <h2>$ProductTitle</h2>
   
   #if($ShowError == "True")
   <div id="errormessage">$ErrorMessage</div>
   #end
   
   #if ($VariantCount == 1)
    <input type="hidden" name="DefaultVariantID" value="$DefaultVariantID">
    <div id="price">$$DefaultPrice</div>
    #else
    <select name="VariantDD">
    #foreach($Variant in $Variants)
    <option value="$Variant.ID">$Variant.Name for $$Variant.Price ($Variant.StockLevel)</option>
    #end
    </select>
    #end  
    <br />
    <br />
    <input type="submit" value="Add to Cart" class="button" />
    
   </form>
   <br/>
   <p>$ProductDescription </p>

I love the new features when they are added but going back to find that I do not have code after a design is installed really puts a pinch in my scheduling. I did look at the WIKI and it is not up to date. And I just can not seem to get you to open up to my telepathic requests for the data.

~~~~~~~~~~~~~~~~~~~~~~~~
Jennifer

Just In! Great Stock Logos from $4.99!!!

Market your business w/ custom postcards!

Hand out customized business cards to everyone you see!

Portfolio of Designs

Post #10735
Posted 6/4/2008 6:06:24 AM


BISI Admin

BISI Admin

Group: Administrators
Last Login: Today @ 7:38:39 PM
Posts: 1,413, Visits: 3,052
You need to assign the onchange event for the variant drop down.

<div id="photos">
       <!--#if($DefaultImageID != "0")-->
    <a href="$DefaultImageURLFull" rel="lightbox[productphotos]"><img src="$DefaultImageURL290px" alt="$ProductTitle" id="product-full"/></a>
    <!--#end-->
    
    <div id="photo-thumbs">
    <!--#foreach($Image in $ProductImages)-->
     <a href="$Image.URLFull" rel="lightbox[productphotos]"><img src="$Image.URL80px" alt="ProductTitle" /></a>
       <!--#end-->
    </div>
   </div>
            <form method="post" action="">
   <h2>$ProductTitle</h2>
   
   #if($ShowError == "True")
   <div id="errormessage">$ErrorMessage</div>
   #end
   
   #if ($VariantCount == 1)
    <input type="hidden" name="DefaultVariantID" value="$DefaultVariantID">
    <div id="price">$$DefaultPrice</div>
    #else
    <select name="VariantDD">
    #foreach($Variant in $Variants)    

<select name="VariantDD" id="VariantDD" onchange="changeStockLevel();swapVariantImage();">

    #end
    </select>
    #end  
    <br />
    <br />
    <input type="submit" value="Add to Cart" class="button" />
    
   </form>
   <br/>
   <p>$ProductDescription </p>


---------------------
Tomas
Post #10743
« Prev Topic | Next Topic »


All times are GMT -7:00, Time now is 11:30pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Disabled.