drummachine24 Posted March 15, 2018 Share Posted March 15, 2018 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 More sharing options...
sacerro Posted March 17, 2018 Share Posted March 17, 2018 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 More sharing options...
drummachine24 Posted March 18, 2018 Author Share Posted March 18, 2018 Sacerro, Thank you for your reply! What controller would I put this in? I am super new to Prestashop and smarty tags, so please excuse my stupid questions. Link to comment Share on other sites More sharing options...
drummachine24 Posted March 19, 2018 Author Share Posted March 19, 2018 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now