Announcement

Collapse
No announcement yet.

Wish List, Don't Remove Items Upon Adding From Wishlist

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

    Wish List, Don't Remove Items Upon Adding From Wishlist

    Is there an easy way to NOT have items removed from the Wishlist after they are ordered?
    Ted Hust
    AarcMediaGroup.com

    Celebrating 13 Years of Outstanding Service & Support
    Miva Merchant Design

    #2
    Re: Wish List, Don't Remove Items Upon Adding From Wishlist

    I haven't tried this, but try removing the wishlist id from the add to cart form on wishlist:

    Code:
    <form method="post" action="&mvte:urls:BASK:secure;">
    	<input type="hidden" name="Action" value="AFWL" />
    	<input type="hidden" name="Wish_ID" value="&mvte:wishlistitem:id;" />
    	<input type="hidden" name="Quantity" value="&mvte:wishlistitem:quantity;" />
    	<mvt:item name="buttons" param="AddToBasketL" />
    </form>
    This is how Miva is tracking which wishlist the item came from and on invoice removes it (like a gift registry). Another option would be to change the action to be ADPR via AFWL.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Wish List, Don't Remove Items Upon Adding From Wishlist

      Originally posted by Brennan View Post
      I haven't tried this, but try removing the wishlist id from the add to cart form on wishlist:

      Code:
      <form method="post" action="&mvte:urls:BASK:secure;">
          <input type="hidden" name="Action" value="AFWL" />
          <input type="hidden" name="Wish_ID" value="&mvte:wishlistitem:id;" />
          <input type="hidden" name="Quantity" value="&mvte:wishlistitem:quantity;" />
          <mvt:item name="buttons" param="AddToBasketL" />
      </form>
      This is how Miva is tracking which wishlist the item came from and on invoice removes it (like a gift registry). Another option would be to change the action to be ADPR via AFWL.
      The above post by Brennan will not work as is (since the AFWL action uses the Wish_ID to add the wish list item to the basket, loading all the necessary product/attribute/option data). The following should do what you're looking for. I tested it in my local dev store with attributes that don't require options (text, textarea, checkbox), attributes that do require options (select, swatch-select, radio), and attribute template with the aforementioned setup.

      Code:
      <form method="post" action="&mvte:urls:BASK:secure;">
      	<input type="hidden" name="Action" value="ADPR" />
      	<input type="hidden" name="Product_Code" value="&mvte:wishlistitem:product:code;" />
      	<input type="hidden" name="Quantity" value="&mvte:wishlistitem:quantity;" />
      
      
      	<mvt:assign name="l.settings:attribute_index" value="0" />
      	<mvt:foreach iterator="attribute" array="wishlistitem:product:options">
      		<mvt:assign name="l.settings:attribute_index" value="l.settings:attribute_index + 1" />
      
      
      		<mvt:if expr="l.settings:attribute:attmpat_id EQ 0">
      			<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:code" value="&mvte:attribute:attr_code;" />
      		<mvt:else>
      			<mvt:do file="g.Module_Feature_ATT_DB" name="l.settings:attributetemplateattribute_loaded" value="AttributeTemplateAttr_Load_ID( l.settings:attribute:attmpat_id, l.settings:attribute:attributetemplateattr )" />
      
      
      			<mvt:if expr="l.settings:attributetemplateattribute_loaded">
      				<mvt:do file="g.Module_Feature_ATT_DB" name="l.settings:attributetemplate_loaded" value="AttributeTemplate_Load_ID( l.settings:attribute:attributetemplateattr:attemp_id, l.settings:attribute:attributetemplate )" />
      
      
      				<mvt:if expr="l.settings:attributetemplate_loaded">
      					<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:code" value="&mvte:attribute:attributetemplate:code;" />
      					<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:template_code" value="&mvte:attribute:attr_code;" />
      				</mvt:if>
      			</mvt:if>
      		</mvt:if>
      
      
      		<mvt:if expr="l.settings:attribute:attr_type EQ 'text' OR l.settings:attribute:attr_type EQ 'memo'">
      			<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:value" value="&mvte:attribute:data;" />
      		<mvt:elseif expr="( l.settings:attribute:attr_type EQ 'radio' ) OR ( l.settings:attribute:attr_type EQ 'swatch-select' ) OR ( l.settings:attribute:attr_type EQ 'select' )">
      			<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:value" value="&mvte:attribute:opt_code;" />
      		<mvt:elseif expr="l.settings:attribute:attr_type EQ 'checkbox'">
      			<input type="hidden" name="Product_Attributes[ &mvt:attribute_index; ]:value" value="Yes" />			
      		</mvt:if>
      	</mvt:foreach>
      
      
      	<mvt:item name="buttons" param="AddToBasketL" />
      </form>
      Just replace the existing form tag on the WISH page in the Wish List Items Layout template for add to basket
      Ryan Guisewite
      Lead UI Developer / Miva, Inc.
      www.miva.com

      Comment


        #4
        Re: Wish List, Don't Remove Items Upon Adding From Wishlist

        Worked like a charm. Thanks a ton Ryan and Brennan.
        Ted Hust
        AarcMediaGroup.com

        Celebrating 13 Years of Outstanding Service & Support
        Miva Merchant Design

        Comment


          #5
          Originally posted by rguisewite View Post
          Just replace the existing form tag on the WISH page in the Wish List Items Layout template for add to basket
          This is just what I was looking for! Thanks
          Highly caffeinated
          http://www.coffeehouseexpress.com

          Comment


            #6
            Is there a way to do a similar thing in the Basket? When on the Basket screen and you click "Add to Wish List" the product is removed from the basket. Can you keep it in the basket and still be able to add it to a wish list? I am basically trying to make the Wish List a Favorites List.
            Highly caffeinated
            http://www.coffeehouseexpress.com

            Comment

            Working...
            X