Jump to content

Is possible to add Wishlist products to Cart ?


Recommended Posts

hi there,

 

i have a doubt here,

 

is it possible to add wishlist products to cart from wishlist page ?

 

but i don't have 'add to cart' button in my wishlist..

 

here i have attached a jpeg for your help...

post-487502-0-35482000-1373349296_thumb.jpg

Link to comment
Share on other sites

that's right, code for add to cart looks like:

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
   {if ($product.quantity > 0 OR $product.allow_oosp)}
   <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
   {else}
   <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span>
   {/if}
{/if}

 

you can try to put this code into your wishlist template file.

Link to comment
Share on other sites

Yes Thanks for your reply.

 

I tried but the first condition not working while, i could not guess what's wrong in it with wish-list page

 

{if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}

 

so i removed this condition , then i found add to cart link but not working cos i guess there is no token generated, here is the link code

 

<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_16" href="http://localhost/fandn/index.php?controller=cart?qty=1&id_product=16&token=&add" title="Add to cart">Add to cart</a>

 

i think the entire code need to be customize for wishlist because the No. of quantity to cart should not be pre-defined for wishlist page. it should have to work like product page , but it looks

qty=1

 

 

and there is no ajax type add to cart how do i implement it wishlist page ?

 

thanx in adv :)

Link to comment
Share on other sites

you can copy the code from product-list.tpl page, its more easy

 

<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}", false)}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a>

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 7 months later...
  • 11 months later...

Is there an final code for this? 

I want to add this to my site too!

 

 

I'm looking for the same thing.

mani313 did you made it work?

Anybody else?

 

Marius

 

 

No! i'm not succeed in that :( 

 

is somebody help out with this ?

 

 

Hello, i want to make this mod too, any help?

Thanks

 

Hello.

On this page there is an answer to this question.

Edited by M03G (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...