Lazy load pages in PrestaShop? - module

By default, pagination in PrestaShop is available in every product page (displaying up to 10 items per page).
But according to my project requirements, I need a lazy loading page (only 10 products need to displayed before trying to scroll down the page). Does PrestaShop have this feature ?

This is not possible by default.
You have to create your own module or buy/use available product like:
Masonry All Products
Infinite Scroll for Prestashop
3. Answer by thepsyntist from https://www.prestashop.com/forums/
[...] I successfully implemented an infinite scroll module on
Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme). I
found this module on GitHub a couple of months ago and finally today I
got success implementing it. Hence I have no direct link for it or
know who created it. Link to the module.
If you'd like to load images the same way, there is one another module.

Related

Integrate search bar (like in product controller for packs) in custom module controller

I'm facing an issue when I'm try to integrate the same search bar as the one in product controller for product packs.
(this one)
I've been scrolling through the whole product controller but didn't find where the search bar is rendered.
I found few parts nearly related of the input in product.js, but nothing really interesting.
What I'm trying to do is implement the same search bar with product suggestions, I will find out later how to "save" it like in product controller when you create a pack.
Backoffice product page had been migrated in Symfony, form is built in a twig template inside:
src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Panels/essentials.html.twig
src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig
While JS handler is here :
admin/themes/new-theme/js/product-page/product-search-autocomplete.js

Prestashop template extends in child theme

I'm beginning to use PrestaShop so I've installed a 1.7.7.1 with the classic theme.
I have created a child theme which uses the classic theme as parent and selected it through the admin page. The website shows normally.
When creating a child theme, I'm trying to modify a small part of the product page by creating a product.tpl page in the child theme. I then try to extends the parent product page but this doesn't work, the product page just stays blank.
Here is the line in my child-theme/template/catalog/product.tpl file:
{extends file='parent:catalog/product.tpl'}
Doing so, I should see the product page as it is with the classic theme.
I've watched some tutorials and I've done the exacts same steps and it is not working properly for me. I can't figure out what I did wrong.
Thanks for the help !
Ok, that was easy, I solved my problem by deactivating the cache and choosing "Recompile templates if the files have been updated" in the advanced parameters.

Prestashop - Too many categories

I have too many categories loading at the same time in prestashop catalog > products page.
I want to hide them or add something like "show more" button. It takes too long to load around 20000 categories and it also won't fully load so I can't save / edit products.
I will be happy if someone could help me out.
First question, Frontoffice or Backoffice you try to load your categories?
you are right. it is since 1.7.0 that this problem is unresolved in prestashop. in 1.6.x there was no problems with categories loading in backoffice due was used ajax. in 1.7x they reworked the product admin page and removed ajax. bad error. now prestashop is simply unfit to handle large sites with too much categories. change platform.

What causes the cart module to not show up on the front-office?

Recently I was doing some integrations on a non-standard/non-official prestashop 1.6 theme.
I found out after some manipulation on the Back-Office that the cart module doesn't appear on the Front-Office.
The cart module is enabled and is hooked to the displayNav and displayTop hooks.
It seems that cart module doesn't render any of its view code even when the "Disable module ovverides" is disabled.
The last and the only thing I've manipulated on the BO config is activating and then deactivating the "Force update friendly url".
Note that the current theme in based on an old theme and was made by an intern that didn't respect the official doc at all. What I mean by that is that you can find inline CSS and Javascript isnide a tpl file with no repsect of the smarty template engine syntax.
The current theme doesn't support many of the hooks that the default and basic prestashop theme offers.
I envisionned the following solution :
Read the 1.6 PS doc and make corrections on the theme. If the number of bugs, problems and mis-uses is not huge.
Rewrite the theme from groung zero in the worst case
After one day of lookin up answers on the web I found out that the catalog mode was off which makes the cart block disapears on the front-office.

Basic Theme Editing in VirtoCommerce

I am running VirtoCommerce 2.4.644. I have a small collection of products and they are not placed in category folders in my catalog. How do I edit the default theme to just show all the most recent items on the home page in one big grid view?
Following the documentation for theme development, I tried to edit css/html, but I can't tell which templates control what.
In the current release there is no out of the box support for themes retriving and showing products that don't belong to any category. In the latest dev, there is "collections.all.products" property that can be used in liquid to get all the products and it should include the ones in the root.