Where the problem occurred: * CS-Cart 4.18.1.SP1 (Store Builder)
Details of the problem:
According to the file /design/backend/templates/views/products/components/products_update_features.tpl there should be 2 instances of the pagination buttons:
Once before and once after the div with the class “product-features__group”
When I remove one instance of the pagination.tpl include (from “{include file=” to “disable history=true}” ) something strange happens to the page.
It suddenly shows an extra box saying there are no items found:
{/if}” that is being executed as well, even though it should be an else statement.
So it seems to me there is an issue on the pagination.tpl template file which is causing both the if and the else to be triggered.
I’m guessing there is another if/else on the pagination.tpl template causing this behavior, but I can’t seem to find what/where exactly.
How to reproduce the problem:
Just go to edit a product, go to the product features tab where there are enough product features to show the pagination option and see there is only a pagination option at the bottom instead of both top and bottom.
That option is already checked, so that’s not the issue:
(sorry but it’s in dutch)
As shown in the code it doesn’t look like this option does anything on the product features tab. If you look at the code there is no if/else statement around the pagination.tpl include.
The code shows the same include code both before and after the product features, but only the bottom one is shown.
And before the backend redesign it was still working, so it looks like the update broke it.
The reason for wanting it at the bottom is that if you have multiple product where you have to edit a product feature on, let’s say page 2, you have to scroll down each time to the bottom of the page to swich to page 2.
While if it’s at the top, you can switch to page 2 straight away, without having to scroll down to the bottom each time.
It saves a lot of time editing.
I have discussed this with the developers, you can also try to increase the PRODUCT_FEATURES_THRESHOLD constant in the config.php file, from 50 to a greater value, so that all the product features will fit into one page without pagination.
Hi, this is also a good suggestion, which I hadn’t thought of before.
Only downside to this is that, while it saves time not having to use pagination at all, it loses time by having to load a larger number of features.
There’s also the risk with really high number of features on a product that you run into the max number of POST-values set in PHP settings when saving.
So setting the number too high could cause issues.
But it’s a good thing to know and there might be a good sweet spot for us, so thanks for the feedback.