Jump to content

Frustrated and desparate to resolve Subcategories Problemo!!!!


Recommended Posts

Hi.
Could someone please help or point me in the right direction for this?
My subcategories are not publishing correctly. They appear as html on the page instead of images and text. (See Image).

website: http://rayspages.xyz

The other, smaller problem is the 'Home' link on the menu (see 2nd image). This gives an error 404 (the link showing is https://rayspages.xyz/gb/index.php?controller=404 )

Is there a way I can change this.

All help or direction greatly appreciated people....feel like i'm going around in circles on this one!

 

751114700_Screenshot2021-06-16at11-55-32MEN.thumb.png.6c58be119de1186569ca2e1359305991.png

Screenshot 2021-06-16 at 11-54-58 WOMEN.png

Link to comment
Share on other sites

16 minutes ago, rayspages.xyz said:

Hi Crezzur. Thanks for getting back to me so quickly!

I'm pretty much into the image work and pretty useless at the real stuff like coding, html etc...

Where do I change this?

 

Hello @rayspages.xyz if you are "pretty useless" in this things i advice you not to do it by yourself.

 

However if you want to edit it yourself, despite my advice, you can find this specific part here:

YOURSTORE\themes\classic\templates\catalog\_partials\category-header.tpl

This when you are using the default Prestashop 1.7 theme Classic.

The code in this file should look like this:

<div id="js-product-list-header">
    {if $listing.pagination.items_shown_from == 1}
        <div class="block-category card card-block">
            <h1 class="h1">{$category.name}</h1>
            <div class="block-category-inner">
                {if $category.description}
                    <div id="category-description" class="text-muted">{$category.description nofilter}</div>
                {/if}
                {if $category.image.large.url}
                    <div class="category-cover">
                        <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
                    </div>
                {/if}
            </div>
        </div>
    {/if}
</div>

 

Link to comment
Share on other sites

2 hours ago, Crezzur said:

Hello @rayspages.xyz if you are "pretty useless" in this things i advice you not to do it by yourself.

 

However if you want to edit it yourself, despite my advice, you can find this specific part here:


YOURSTORE\themes\classic\templates\catalog\_partials\category-header.tpl

This when you are using the default Prestashop 1.7 theme Classic.

The code in this file should look like this:


<div id="js-product-list-header">
    {if $listing.pagination.items_shown_from == 1}
        <div class="block-category card card-block">
            <h1 class="h1">{$category.name}</h1>
            <div class="block-category-inner">
                {if $category.description}
                    <div id="category-description" class="text-muted">{$category.description nofilter}</div>
                {/if}
                {if $category.image.large.url}
                    <div class="category-cover">
                        <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
                    </div>
                {/if}
            </div>
        </div>
    {/if}
</div>

 

Hi Crezzur. I've just saved a copy of the original tpl file and then changed the information as you said. Unfortunately its exactly the same.
So no changes. Anything else you can think of for me to try?

Link to comment
Share on other sites

2 hours ago, Crezzur said:

Hello @rayspages.xyz if you are "pretty useless" in this things i advice you not to do it by yourself.

 

However if you want to edit it yourself, despite my advice, you can find this specific part here:


YOURSTORE\themes\classic\templates\catalog\_partials\category-header.tpl

This when you are using the default Prestashop 1.7 theme Classic.

The code in this file should look like this:


<div id="js-product-list-header">
    {if $listing.pagination.items_shown_from == 1}
        <div class="block-category card card-block">
            <h1 class="h1">{$category.name}</h1>
            <div class="block-category-inner">
                {if $category.description}
                    <div id="category-description" class="text-muted">{$category.description nofilter}</div>
                {/if}
                {if $category.image.large.url}
                    <div class="category-cover">
                        <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
                    </div>
                {/if}
            </div>
        </div>
    {/if}
</div>

 

Hi Crezzur. I've just saved a back up of the tpl file and changed the original to the text above. Turns out it was already the same. I did notice that the bit of code you sent before is not in it?

{$myvariable nofilter}

Should this go in it? If not, any ideas where this might be going wrong?

Cheers again.

Link to comment
Share on other sites

29 minutes ago, rayspages.xyz said:

Hi Crezzur. I've just saved a back up of the tpl file and changed the original to the text above. Turns out it was already the same. I did notice that the bit of code you sent before is not in it?

{$myvariable nofilter}

Should this go in it? If not, any ideas where this might be going wrong?

Cheers again.

Not sure whats happened as I haven't actually changed anything but now my Dashboard is not opening.

Link to comment
Share on other sites

11 minutes ago, Crezzur said:

1. did you delete your cache after the edit?

2. Can i have a look on your backoffice? (send credentials to my mailbox)

Hi Crezzur. I can't access my back office now. This is the link to the page but it comes up blank :(

https://rayspages.xyz/admin123/index.php?controller=AdminDashboard&token=7adbc618a98973a55580f9b536a14241#/


Happy to send creds but what do you need?

Can't delete cache as I can't get into back office.

 

Edited by rayspages.xyz (see edit history)
Link to comment
Share on other sites

Problem resolved for @rayspages.xyz, i explain it here if someone else encounter this issue.

in the file located here: StoreName/themes/classic/templates/catalog/listing/category.tpl

The Subcategory Descriptions is called like below

<div class="cat_desc">{$subcategory.description}</div>

In Prestashop 1.7, all template variables containing html elements (<h3>, <div>, <li>, ... ) needs to be escaped using nofiler. After adding this the issue was resolved.

Correct way:

<div class="cat_desc">{$subcategory.description nofilter}</div>

 

  • Like 1
Link to comment
Share on other sites

7 minutes ago, Crezzur said:

Problem resolved for @rayspages.xyz, i explain it here if someone else encounter this issue.

in the file located here: StoreName/themes/classic/templates/catalog/listing/category.tpl

The Subcategory Descriptions is called like below


<div class="cat_desc">{$subcategory.description}</div>

In Prestashop 1.7, all template variables containing html elements (<h3>, <div>, <li>, ... ) needs to be escaped using nofiler. After adding this the issue was resolved.

Correct way:


<div class="cat_desc">{$subcategory.description nofilter}</div>

 

Crezzur is an absolute life saver! Thanks Dude!!!! Now I can get on with it! :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...