• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 17.04.20, 10:08
  • Opened by: Peter Michalik
  • Closed by: Fred
  • Closed on: 28.05.20, 00:23
  • Reason: Closed
  • Comment: Glad to help!

Ticket #17386 - Count of products on Category page in faces search after Alysum installation

Hi there.

we installed the template but it is not showing the count of products when filtering.

This was working well with default installation of PrestaShop 1.7 and default theme and problem appeared only after installation of Alysum theme. How to enable this back?

I believe, facet search module is set correctly:

Thanks ahead for your answers, Martin

Attachments:

image.png (279.9 KiB)
image (1).png (98.5 KiB)

Comments

Fred 17 Apr 2020, 10:29

Hi, Peter.
Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your server through FTP

Peter Michalik 19 Apr 2020, 13:05

Pleas provide details in what theme sub-folder you’d like to work in and what exactly changes you will perform.

Fred 20 Apr 2020, 10:37

I need access to “themes” folder

Fred 20 Apr 2020, 10:38

I don’t know what changes I’ll make

Peter Michalik 20 Apr 2020, 10:55

ok we will create account for you to access themes folder. please specify where you think problems might be and what changes you will perform.

according to official prestashop documentation, changes in the code should be performed in child them from Alysum theme so upgrades would not affect the changes you perform.

regards, Martin

Fred 20 Apr 2020, 13:08

Ok, let me know once it will be ready

Peter Michalik 20 Apr 2020, 18:26

please FOR THE THIRD TIME specify where you think problems might be and what changes you will perform.

Fred 20 Apr 2020, 21:31

somewhere in the theme’s files

Peter Michalik 23 Apr 2020, 17:12

Hello Fred, the FTP information has been uploaded. Please proceed

Fred 23 Apr 2020, 21:59

Hi, Peter.
I’m not able to help you in this conditions.
1. I don’t have access to theme and modules files, here is what I see on your server through my FTP account https://take.ms/0EnEU 2. I also need access to back office to see the configuration of theme/modules
3. Your store is in maintenance mode and I’m not able to disable it or add my IP to an exception

Peter Michalik 24 Apr 2020, 12:41

Fred, I added your IP to the shop, access to BO, FTP access to child directory of Theme. I assume you can work now. Please let me know.

Fred 24 Apr 2020, 13:58

I still don’t have access the theme’s files https://take.ms/KkZiX

Please try yourself. Open the file /themes/alysum/modules/ps_facetedsearch/views/templates/front/catalog/facets.tpl
find the line:

<span class="magnitude hidden">({$filter.magnitude})</span>

and remove “hidden” class there

Peter Michalik 24 Apr 2020, 15:31

Hi Fred. Can you please make all changes in the child theme where you definitely DO HAVE ACCESS TO. The root directory where you have access to is the child theme root directory /obuvtopky.sk/web/themes/alysumchild

otherwise if you make any changes to parent theme directory, they might be overwriten with next theme update. please let me know you understood that and can perform the changes. if you have any troubles doing so, please share your phone number to talk

Fred 24 Apr 2020, 15:42

Have you tried to do what I suggester you? Is that solved your problem?

Peter Michalik 25 Apr 2020, 16:54

Hi Fred, yes your solution works if I change the files in the original alysum theme folder.

However I was not able to make the solution work in child theme (according to manual https://belvg.com/blog/overriding-modules-in-prestashop-1-7.html .

Can you please provide the solution in the child theme folder where you have access to in FTP. Regards, Martin

Fred 26 Apr 2020, 11:50

That article is not what you need.
Check this out https://build.prestashop.com/news/Child-Themes-Feature/

You just need to copy that file from parent theme to child with the same folders path

Peter Michalik 26 Apr 2020, 12:52

Hello Fred, i tried exactly that but it doesn’t work. Can you please take a look and make this work. Regards

Fred 26 Apr 2020, 12:59

I just copied that file into your child theme /modules/ps_facetedsearch/views/templates/front/catalog

Peter Michalik 27 Apr 2020, 10:50

Fred, thank you. How would you solve this without copying the entire file but just modifying certain block as recomended by Alysum and Prestashop documentations? I believe it is block:

{block name='facet_item_other'}
Fred 27 Apr 2020, 11:03

I have no idea. What is the problem with file copying?

Peter Michalik 27 Apr 2020, 11:12

it will rewrite the whole file. once template update will come, we might loose this functionality. That’s why it’s better to rewrite only specific block. can you help here please? this is a general recommended approach.

Fred 27 Apr 2020, 11:14

but you have child theme, nothing will be rewritten there

Peter Michalik 27 Apr 2020, 15:11

in case update comes and part of the code is updated in the whole file, it will not be reflected because whole file is substituted by placing the file into child theme folder. it is required to only update block of the code.

{block name='facet_item_other'}
Peter Michalik 28 Apr 2020, 17:31

Hi Fred, can you let us know when you can take a look at this. We will be going live at the end of this week.

Fred 29 Apr 2020, 10:48

But I gave you the solution, I don’t have another one

Peter Michalik 29 Apr 2020, 12:57

The solution is not working in accordance to documentation and it will stop working with next update. Please implement the solution where only one block of code is substituted instead of the whole file in accordance with best practices and official documentation.

Fred 29 Apr 2020, 13:06

I don’t have another solution, sorry.
Nothing will be overridden in the child theme

Peter Michalik 29 Apr 2020, 13:08

Fred we clearly dont understand what’s needed. Can we have a call regarding this? please share your phone number

Fred 29 Apr 2020, 13:12

You have the number of products, what you initially asked https://take.ms/R2k5C

Peter Michalik 30 Apr 2020, 19:16

yes, this works, but I am afraid it might not work with new theme update. that’s why I wanted to implement this as block change instead of change of the whole file. let me know whether it makes sense to you.

Fred 01 May 2020, 11:19

nothing will be rewritten with an update in the child theme