custom field on productlisting

  • Posts: 14
  • Thank you received: 0
5 years 6 months ago #298795

How to show a custom field (text area) at the bottom of a productlisting page?

Please Log in or Create an account to join the conversation.

  • Posts: 81514
  • Thank you received: 13068
  • MODERATOR
5 years 6 months ago #298806

Hi,

There is no option to display a text area on the products listing.
What would you use it for ? Could you please provide more information on what you're trying to do so that we could have a better understanding of your situation ? Maybe we could be able to provide a solution then.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
5 years 6 months ago #298813

By default the category description box is showed at the top of the page. Which is good, but I would like to create a second category description box underneat the page, just above the pagination (see screenshot). I managed to realize this at former websites, unfortunatly i could not provide an example. I used this threat to accomplish this: www.hikashop.com/forum/product-category-...e-category-page.html . But at the latest version of hikashop this solution provides me an error. So help is much needed.

i created a custom field with table: category, field type: text area.

But i need it to show at the productlisting page. Which i probabaly need to edit the com_hikashop/views/product/tmpl/listing.php ?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81514
  • Thank you received: 13068
  • MODERATOR
5 years 6 months ago #298816

Hi,

The solution on this post www.hikashop.com/forum/product-category-...ory-page.html#140434 is still valid even with the latest version of HikaShop (4.0.0).
So you must have done something wrong with your modification.
What error did you get ? And could you provide a screenshot of the code modification you made ?
Note also that you want to edit the view file via the menu Display>Views and not directly the file components/com_hikashop/views/product/tmpl/listing.php
That way, you won't loose the change when you update your HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
5 years 6 months ago #298922

Im using this code: <?php echo $this->element->custom_field;?>

“custom_field” is the actual column name of my custom field with table category.

Ive added this line to the following file: listing.php of the view product.

Ive placed this line at the bottom of the document. Right after:

</div>
<?php
}

It leads me to the following error message when trying to acces the productlisting page:

Parse error: syntax error, unexpected <path\components\com_hikashop\views\product\tmpl\listing.php on line 375

Line 375 = end of the file where i put the above line of code

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
5 years 6 months ago #298938

Hello,

Your issue is coming from the way you have added your code customization, can you send us the file "listing.php" of the product view so that we can directly check it ? Thank you.

Kind regards,
Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
5 years 6 months ago #299213

I would love to but since it is not allowed to upload any php files it would difficult.

According to the following message i receive when trying to upload the requested file:

'You need to use allowde file extension (.jpg, etc)

So, can i send it by e-mail or?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
5 years 6 months ago #299220

Hello,

In that case, can you show us screenshots of the code around the line 375 "components\com_hikashop\views\product\tmpl\listing.php" so that we can directly check it ? Thank you.

Kind regards,
Mohamed Thelji.

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum