Announcement

Collapse
No announcement yet.

Category Wishlist Link that works

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Category Wishlist Link that works

    I am sure there is a better way to do it but this works. Hope a great power steps in and can give us a better solution. I did a search for "wishlist category page" in this forum and essentially got nothing. I can't find any docs on this. It works on the basket so I know it works on the cat page. If you roll back to Point and Click Mode on the Category Product List Layout it does give you the option to include the add to wishlist button. That is what I'm doing here and it does work but it's very clunky. This is using Levels Readytheme Styling.

    <form method="post" action="&mvt:global:sessionurl;" class="nm">
    <input type="hidden" name="Action" value="ADPR">
    <input type="hidden" name="Screen" value="CTGY">
    <input type="hidden" name="Store_Code" value="&mvte:store:code;">
    <input type="hidden" name="Offset" value="&mvte:global:Offset;">
    <input type="hidden" name="Product_Code" value="&mvte:product:sku;">
    <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;">
    <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">

    <div class="row">
    <div class="column whole nm" style="margin-left:15px; margin-bottom:15px;">
    <div class="row add-to-cart-wrap">
    <div class="column large-two-fifths medium-whole two-fifths">
    <input type="tel" name="Quantity" value="&mvt:product:customfield_values:customfield s:QTY_Required;" id="l-quantity" class="align-center float-left increase-decrease-input" />
    <div class="increase-decrease-wrap float-left">
    <span id="js-increase-quantity" class="button increase-quantity" unselectable="on" data-icon="&#x4c;"></span>
    <span id="js-decrease-quantity" class="button decrease-quantity" unselectable="on" data-icon="&#x4b;"></span>
    </div>
    </div>
    <div class="column large-three-fifths medium-ten-twelfths three-fifths">
    <div class="breaker hide medium-all-shown large-all-hidden"></div>
    <button id="js-add-to-cart" class="button bg-green white bold" style="margin-bottom:0px; min-width:155px;">Add to Cart</button>
    </form>
    <form method="post" action="&mvte:urls:WISH:secure;">
    <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" />
    <input type="hidden" name="Old_Search" value="&mvte:global:Search;" />
    <input type="hidden" name="Action" value="ATWL" />
    <input type="hidden" name="Quantity" value="1" />
    <input type="hidden" name="Product_Code" value="&mvte:product:code;" />
    <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;" />
    <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
    <input type="hidden" name="Offset" value="&mvte:global:CatListingOffset;" />
    <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" />
    <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" />
    <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" />
    <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" />
    <mvt:item name="buttons" param="AddToWishListE" />
    </form>
    </div>
    </div>
    </div>
    </div>

    #2
    The way you are doing is a good method with a separate form just for the wishlist. To add a product to wishlist you need the form action of ATWL, Product_Code and Quantity. On the product page we essentially just swap out the action on click so you don't have to duplicate the form. That method is still possible on the category page, but since there are multiple forms it requires a bit more JavaScript.

    I actually prefer having it is its own form, seems a bit cleaner.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X