nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Miss The "reset" Button For Advanced Variants In V4?, Use this code to get it in v7
Rating 5 V
scaldiran
post Nov 18 2008, 05:25 PM
Post #1





Group: Verified NS Member
Posts: 71
Joined: 10-August 07
From: Belleville, IL
Member No.: 5



I just talked with a client that wanted the reset button that was available in version 4 advanced variants to show in version 7. I thought I'd share what I did, in case anyone else wants the same functionality. Warning: you must know basic HTML in order to use this functionality.

This code will refresh the product details page, and put all the variation selections back to default:

CODE
<style type="text/css">
a.prod-layout-button {
  border: 4px outset;
  text-decoration : none;
  padding : 2px;
  border-color : #6A7E94 #330066 #330066 #6A7E94;
}
a.prod-layout-button:hover { border-color: #ccc; }
</style>
<div style="margin-top: 10px;" align="right">
<script language="JavaScript">
    document.writeln('<a class="prod-layout-button" href="'+location.href+'">Reset</a>');
</script>
</div>


To get this to display properly (i.e., only when variations exist on a product), simply put it in the following location, under the Product Layout Design section:

CODE
      <ns:if condition="Product.HasVariations">
        <div style="margin-top:20px">
          <h3><%Product.VariationsLabel%></h3>
          <ns:ProductVariations />
          <!-- Insert code from above here -->
        </div>
      </ns:if>


Just thought I'd pass this along, in case anyone is interested.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2009 Time is now: 21st November 2009 - 11:41 PM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates