Jump to content

A link to shopping cart for logged in users


Recommended Posts

I don't understand why little tasks in Prestashop seem to be difficult to accomplish.

I'm hoping someone can help me!  All I am trying to do is put a link to the shopping cart of the logged in user, but not show the shopping cart link to non logged in user.

Can anyone give me a hand in figuring out this, please please please!

Link to comment
Share on other sites

In your controller (or override Product Front controller) use $this->context->customer->isLogged() and pass it to your smarty tpl ($this->context->smarty->assign(array('logged' => (bool) $this->context->customer->isLogged()))

In your tpl check if true and show add to cart.

 

Hope this help you!

Link to comment
Share on other sites

Well, I will keep playing with what you sent me, but in the mean time, I found a work around solution.

I created a new product category called MY SHOPPING CART, and in the description, I put in an HTML button labeled "My Shopping Cart" and added a link to the shopping cart to the button,  I assigned that category to be visible for all customer groups,  So when the customer logs in, the have their product categories they are allowed to see, based on their customer group they are in, and they also see the MY SHOPPING CART product category.  They click that on the menu, then they have to click the HTML button that takes them to the shopping cart link.

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...