• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Marek
  • Private: No
  • Open Date: 18.03.19, 15:40
  • Opened by: Łukasz
  • Closed by: Marek
  • Closed on: 01.05.19, 15:39
  • Reason: Closed
  • Comment: Glad to help!

Ticket #13976 - Product brand on homepage by the module from addons

I bought the module https://addons.prestashop.com/pl/bloki-zakladki-banery/31125-sliders-banners-products-manufacturers-home-cat.html,
which displays the product slider on the main page, loading the display method as in category, from the tpl file –

{if $content.product_slider.type === 'products'}
  {if $usesListStyle}
    {foreach $responsivelayout->getProductInfosByIds($content.product_slider.products) as $product}
      {include file='catalog/_partials/miniatures/product.tpl' product=$product}
    {/foreach}
  {/if}
{/if}

however, the product brand, product_manufacture field is not displayed on the home page, what could be the reason for this?

I am sending the module’s tpl file

Home page where products are displayed - https://daars.pl/

an exemplary category where the brand is visible - https://daars.pl/miksery-wideo-49

the other parameters are downloaded correctly like meta tags, etc.

greetings

Comments

Łukasz 18 Mar 2019, 15:46

the module’s author suggests to ask
how he implements the manufacturer’s name in the category page? Does he go through an override? A js file?

Marek 18 Mar 2019, 23:46

I read your message several times but I do not understand what I have to do.
There is no any overrides, we just show manufacturer name what available in the category page variables.

Łukasz 19 Mar 2019, 23:01

I’m trying to set up why the module does not display the producer name for products displayed on the home page by this module, since it uses a template file for that. Displays the remaining variables. Is it possible that this variable $product.manufacturer_name is in some way blocked for display on the home page? Or other modules can not use it?

The code looks like this in the template file

{if (isset ($ smarty.cookies.pm_brand) && ($ smarty.cookies.pm_brand == true)) || (isset ($ pkts.pm_brand) && $ pkts.pm_brand == true)}
           {if (isset ($ product.manufacturer_name))}
           {block name = 'product_manufacturer'}
             <h6 class = "product-brand ellipsis"> {$ product.manufacturer_name} </ h6>
           {/ Block}
           {/} If
         {/} If
Marek 20 Mar 2019, 12:09

I suppose because your code is broken, here is clear code

{if (isset($smarty.cookies.pm_brand) && ($smarty.cookies.pm_brand == true)) || (isset($pkts.pm_brand) && $pkts.pm_brand == true)}
  {if (isset($product.manufacturer_name))}
    {block name='product_manufacturer'}
      <h6 class="product-brand ellipsis">{$product.manufacturer_name}</h6>
    {/block}
  {/if}
{/if}
Łukasz 20 Mar 2019, 12:45

the $ space appeared probably by formatting the forum. I’ve copied your code again and it still does not work.

Marek 21 Mar 2019, 11:58

Where that file is located, I’ll try to paste it myself

Łukasz 21 Mar 2019, 14:01

I am sending you the _product_slider.tpl file, which is in the module, and the proct.tpl template file that this module uses, and the whole module zip file
The products are now displayed by this module on the website - https://daars.pl/

Marek 21 Mar 2019, 23:06

Try to remove condition:

{if (isset($smarty.cookies.pm_hover_image) && ($smarty.cookies.pm_hover_image == true)) || (isset($pkts.pm_hover_image) && $pkts.pm_hover_image == true)}

and the end

{/if}

to leave only

{if (isset($product.manufacturer_name))}
    {block name='product_manufacturer'}
      <h6 class="product-brand ellipsis">{$product.manufacturer_name}</h6>
    {/block}
  {/if}
Łukasz 22 Mar 2019, 09:26

Unfortunately, it did not help

Marek 22 Mar 2019, 10:15

Please show me at the screenshot where do you want to have manufacturer name?

Łukasz 22 Mar 2019, 10:31

Screen in the attachment, I would like to add over the product name, on the home page https://daars.pl, as it is now in the category page

Marek 22 Mar 2019, 10:32

I’m not able to connect to your server through FTP

Łukasz 22 Mar 2019, 10:37

What email address can I send you access to?

Marek 22 Mar 2019, 10:41

Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile

Łukasz 22 Mar 2019, 10:43

ok, corrected

Marek 22 Mar 2019, 10:45

No success:

Command:	open "f1363_lukaszwojcik1990@s16.mydevil.net" 22
Command:	Trust new Hostkey: Once
Command:	Pass: *************************
Error:        	Authentication failed.
Error:        	Critical error: Could not connect to server
Łukasz 22 Mar 2019, 10:57

I connect via filezilla and this data works, but I do not specify a port there, try maybe by 21?

Marek 22 Mar 2019, 11:03

port 21 used by default. Maybe you have some restrictions by IP?

Łukasz 22 Mar 2019, 11:09

I do not see such settings, I also logged in from another place and ip and it worked.

Marek 22 Mar 2019, 11:18

I have following configuration http://take.ms/NCMyg

Łukasz 22 Mar 2019, 11:23

change the protocol to FTP

Łukasz 22 Mar 2019, 11:24

my config

Marek 22 Mar 2019, 11:33

Now I can connect.
I have figured out your module doesn’t return brand name. You can make sure in that with the code below what will show you all product data

{$product|print_r}

http://take.ms/HGCgL

Łukasz 22 Mar 2019, 11:37

it shows everything except the brand name

Marek 22 Mar 2019, 11:42

yes

Łukasz 22 Mar 2019, 11:48

What do I have to do to display the brand?

Marek 22 Mar 2019, 12:08

the module has to provide it first to let you display

Łukasz 22 Mar 2019, 12:36

the module gets information from the file “include file = ‘catalog / _partials / miniatures / product.tpl” , it should also display the brand because it is in this file , in the same way as meta tags and others show

Marek 22 Mar 2019, 13:07

no that’s not right. The module gives data to the file catalog / _partials / miniatures / product.tpl to display it there

Łukasz 22 Mar 2019, 13:18

And what should I add in the module file to display product brand on the home page?

Marek 22 Mar 2019, 13:18

Ask module developer