Slow loading of the categories page and the paginator of the products on the same page in question - prestashop

this is a screen recording related to the issue: https://calip.io/U7eBbuDW#q1GpTStt.
Explanation of the problem:
Going to https://mcgroup.store/it/2-home, the page loading is very slow (it takes several seconds to load).
The CPU of the server where the site is hosted shoots at 100% and the memory also goes to high percentages when I load that page.
And the same thing also happens in the product paginator when I click on 1,2,3, etc. or on the arrow to move forward.
Before I do this page or paginator load, the server's CPU and memory levels are always at normal levels.
I've already tried clearing the cache and turning on automatic clearing, but nothing.
Same thing by activating the "special" caches.
Also all php settings requirements meet Prestashop's recommended requirements.
Contacting Prestashop support I was told that there is a problem in the "ybc_themeconfig" module that adds an Ajax tool to the product list.
How can I fix this problem?
I use Prestashop 1.7.8.5

To check if your slow loading is due to hosting performance or your Prestashop itself, try to switch back to the default Prestashop theme.
If i'm not mistaken your theme is 'Pro Business - Multipurpose Prestashop Theme '
Your theme has not adapted to Prestashop 1.7.8.5 contact the theme builder, if the issue is indeed your theme.

Related

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.

How to change in template through the Shopify application

I am trying to write a Shopify application and I want to add a section to the product page when the store owner installed my app. I tried this by adding a custom script tag in the shop template and this tag will load and inject my desired HTML into the page. It's work but it needs to force the store owner to change the product page template and its not user-friendly.
I see some apps in the Shopify app store that can change the product page after you install them without needs add any part to the product page template. How they do this work? I can't find the correct way in the Shopify documents.
You can change the Shopify theme of the shop using The API for Assets:
However as drip mentioned this is not a good idea:
If you change the theme auto-magically via code, you are looking for trouble. A lot of things can go wrong - simply you cannot cater for all themes and their changes over time! So you could possibly leave a broken page after the change. The e-shop owner won't be impressed! Actually a lot of the 1* reviews of apps are for that reason!
What would happen if the eshop owner removes your app? He won't know what code to remove.
So, most apps ask the user to add the app code. They provide detailed instructions of course.
Fyi, another problematic approach is the following:
Some apps may attempt to change the DOM "on the fly", by first locating an existing DOM element (a lot of theme-specific if statements to do that with any degree of success) and, then insert the app's DOM elements.
That's very messy and problematic as well, but at least you do not risk ruining the owner's theme files. In the worst case he can uninstall your app and he 'll be ok.

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.

Lazy load pages in PrestaShop?

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.

wiki custom page layout freez the save,checkout, and page layout option?

I have developed the Custom Wiki page layout and deployed it successfully but once I changed the layout its freeze pagelayout, save, checkout options?
I have checked with admin/siteowner user
Run on IE, Chrome, etc browsers also.
This is usually caused by one of or a few different issues, all of which are nearly impossible to troubleshoot remotely.
You did not include certain required layout assets.
Improper markup
Invalid web part references.
Invalid system layout id references.
A couple of techniques that can be used to diagnose this further.
Start with the default template in sharepoint designer and keep changing slowly until you reach your final layout.
Wait for the page to timeout or view the console in developer tools to see if there is any details.