dododo Posted January 29 Share Posted January 29 (edited) For visitors, I would need to limit the number of products to view. Can anyone give me suggestions? Thank you Edited February 7 by dododo (see edit history) Link to comment Share on other sites More sharing options...
Divine Posted January 29 Share Posted January 29 Just enable the products you want them to view and disable others Link to comment Share on other sites More sharing options...
dododo Posted January 30 Author Share Posted January 30 Hello, Divine. Thanks for answering me. I did some checking but I didn't understand what you mean. Could you be so kind as to tell me what to do? grazie Link to comment Share on other sites More sharing options...
Divine Posted January 30 Share Posted January 30 Do you mean for all visitors or only for a specific group ? Link to comment Share on other sites More sharing options...
dododo Posted January 30 Author Share Posted January 30 All visitors only. They can view, for example, 12 products for each category and view links inviting them to register. Apparently the file should be product-list.tpl. For registered users, everything remains unchanged. Link to comment Share on other sites More sharing options...
Divine Posted January 30 Share Posted January 30 Ok so which version of Prestashop and which theme do you use ? Link to comment Share on other sites More sharing options...
dododo Posted January 30 Author Share Posted January 30 (edited) 8.1.7 - vt_carafity 🙂 Edited January 30 by dododo (see edit history) Link to comment Share on other sites More sharing options...
Divine Posted January 30 Share Posted January 30 Which theme please ? 😊 Link to comment Share on other sites More sharing options...
Divine Posted January 30 Share Posted January 30 Ok so I don't know this theme but if it is conceived like classic one you can modify the file "productlist.tpl" which is in the folder "templates >> catalog >> _partials" of your theme like this : {foreach from=$products item="product" key="position" name="loop"} {if !$logged && $smarty.foreach.loop.iteration <= 12} {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position productClasses=$productClasses} {/if} {/foreach} Add the name "loop" in the foreach and add the condition that check if user is logged and the number of products to display. 1 Link to comment Share on other sites More sharing options...
dododo Posted January 30 Author Share Posted January 30 Thank you so much Divina, I'll update you as soon as possible. Thank you 😍 Link to comment Share on other sites More sharing options...
Divine Posted January 30 Share Posted January 30 No problem And if you need to add a link inviting your visitors to register, you can add it in the condition, just above the {/if}. Link to comment Share on other sites More sharing options...
dododo Posted February 2 Author Share Posted February 2 Hi Divine, it works💥Great!!! Thank you for your valid and valuable suggestion. Link to comment Share on other sites More sharing options...
Divine Posted February 5 Share Posted February 5 Great ! Don't forget to edit your first post and to add [Solved] in the title 1 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