Jump to content

How to hook wishlist module on shopping cart page.


Recommended Posts

I am trying to add the wishlist below my shopping cart so that user can add products from wishlist directly.

 

i managed to hook the wishlist but the products in the wishlist comes from the shopping cart instead of displaying from wishlist's product list.

 

can anyone let me know what did i do wrong?

Link to comment
Share on other sites

let's clarify.

- what you mean by wishlist? some part of wishlist module? which one?

- what you mean by shopping cart? some part of block cart module? or cart page?

 

what theme you use and what prestashop version?

Hello vekia,

 

ps version: 1.6.0.9

theme: default

I am making modifications in the prestashop module blockwishlist.

I have managed to do the above task.

 

but i have one new problem.

 

i want that my wishlist should be visible on shoppingcart page too.

so i created a hook

 

public function hookShoppingcart($params)

    {

        return $this->display(__FILE__, 'blockwishlist-cartpage.tpl');

    }

 

which displays the content in blockwishlist-cartpage.tpl file at the end of shoppingcart page.

 

but when i increase the no. of products in the cart(clicking on +) the wishlist gets empty.

 

so to avoid this issue i called the hook in shopping-cart.tpl file

like

{hook h="Shoppingcart" mod="blockwishlist"}

which displays products even when i click on + to increase the no. of products.

 

result: i have two wishlists .

1st: due to hookShoppingcart method (at the end of page)

2nd: after calling hook in shopping-cart.tpl file. (below the shoppingcart page)

 

i don't want the 1st one.

in the attachment you can see the wishlist appearing twice.post-849301-0-40970000-1415356870_thumb.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...