[Skip to main content](#vessel-content)

#  Profile for assun

##

[![assun's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-06-12.jpg)](/forum/user/19855-assun "View assun's Profile")

**[ Offline](/forum/user/19855-assun)**

- **User Type:** User

- **Register Date:** 21 May 2013
- **Last login:** 1 week 15 hours ago
- **Time Zone:**  UTC +0:00
- **Local Time:** 13:16

- **Posts:** 3
- **Profile views:** 50

- **Location:**  [Bulgaria](https://maps.google.com?q=Bulgaria)
- **Gender:** Male
- **Birthdate:** 16 Dec 1978
- **Medals:**  Hikashop Business

[ BLiDiS](http://www.BLiDiS.com)

- Posts

#  assun's recent posts  (3 messages )

All Since last visit 4 Hours 8 Hours 12 Hours 24 Hours 48 Hours Week Month Year     All Since last visit 4 Hours 8 Hours 12 Hours 24 Hours 48 Hours Week Month Year

| <a id="forumtop"> </a> [  ](#forumbottom) | Subject | Replies / Views | Last Post | <a id="forumbottom"> </a> [   ](#forumtop) |
|---|---|---|---|---|
| [](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317135) | [Custom fields value in product listing](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317135 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Chrome  Hi, I want to attach a file (zip, pdf…) to the products that the client can download. I know of a built-in HikaShop system that does just that. I upload the file to the product and make it free to download. The problem is that I want to know how many times a file has been downloaded. This is not possible in HikaShop. That's why I'm thinking of using the jDownloads component. It has a plugin that with a specific string / {jd&#95;file file == 1} / previews a download button /  Download  /. And the component provides statistics for downloads.  I created a Custom field - Table-&gt; product, Field type-&gt; text, Column name-&gt; dw&#95;file, Label-&gt; Download, Front-end-&gt; NO. There I enter the string / {jd&#95;file file == 1} / in the product. I found in the forum: $fieldsClass = hikashop&#95;get('class.field'); $fields = $fieldsClass-&gt;getFields('frontcomp', $this-&gt;row, 'category'); foreach ($fields as $fieldName =&gt; $oneExtraField) { if ($oneExtraField-&gt;field&#95;namekey == 'dw&#95;file') $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); } …  echo $myfile;?&gt;  I put this code in product-&gt; listing&#95;img&#95;title and product-&gt; show&#95;default, but I can't figure out why it doesn't work.  I ask for your assistance.  Best Regards")        Category: [Product &amp; Category Display](/forum/26-product-category-display "Questions about product and category display. You can't find how to make Hikashop looks incredible? The answer is here!")     Topic started 6 years 6 months ago, by [assun](/forum/user/19855-assun "View assun's Profile")       [Last Post](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317155 "Hi,  The line: $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); should be: $myfile = $fieldsClass-&gt;show($oneExtraField,$this-&gt;row-&gt;$fieldName); in your previous code.  Now, the error &quot;Call to undefined method hikashop::show()&quot; cannot happen with your previous code. That would indicate that $fieldsClass is of the class &quot;hikashop&quot; which is not possible. So you must have changed something else.  And it's normal that $field-&gt;field&#95;value is empty as this variable contains the list of values to choose from in dropdowns, radio / checkbox lists, etc. If you don't want to use the show function, you can directly do: $myfile = $this-&gt;row-&gt;$fieldName; This should display the same thing as with the call to the show function for custom fields of the type &quot;text&quot;.") 6 years 6 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:3  Views:288 | [Last Post](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317155 "Hi,  The line: $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); should be: $myfile = $fieldsClass-&gt;show($oneExtraField,$this-&gt;row-&gt;$fieldName); in your previous code.  Now, the error &quot;Call to undefined method hikashop::show()&quot; cannot happen with your previous code. That would indicate that $fieldsClass is of the class &quot;hikashop&quot; which is not possible. So you must have changed something else.  And it's normal that $field-&gt;field&#95;value is empty as this variable contains the list of values to choose from in dropdowns, radio / checkbox lists, etc. If you don't want to use the show function, you can directly do: $myfile = $this-&gt;row-&gt;$fieldName; This should display the same thing as with the call to the show function for custom fields of the type &quot;text&quot;.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      6 years 6 months ago |
| [](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317107) | [Custom fields value in product listing](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317107 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Chrome  Hi, I want to attach a file (zip, pdf…) to the products that the client can download. I know of a built-in HikaShop system that does just that. I upload the file to the product and make it free to download. The problem is that I want to know how many times a file has been downloaded. This is not possible in HikaShop. That's why I'm thinking of using the jDownloads component. It has a plugin that with a specific string / {jd&#95;file file == 1} / previews a download button /  Download  /. And the component provides statistics for downloads.  I created a Custom field - Table-&gt; product, Field type-&gt; text, Column name-&gt; dw&#95;file, Label-&gt; Download, Front-end-&gt; NO. There I enter the string / {jd&#95;file file == 1} / in the product. I found in the forum: $fieldsClass = hikashop&#95;get('class.field'); $fields = $fieldsClass-&gt;getFields('frontcomp', $this-&gt;row, 'category'); foreach ($fields as $fieldName =&gt; $oneExtraField) { if ($oneExtraField-&gt;field&#95;namekey == 'dw&#95;file') $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); } …  echo $myfile;?&gt;  I put this code in product-&gt; listing&#95;img&#95;title and product-&gt; show&#95;default, but I can't figure out why it doesn't work.  I ask for your assistance.  Best Regards")        Category: [Product &amp; Category Display](/forum/26-product-category-display "Questions about product and category display. You can't find how to make Hikashop looks incredible? The answer is here!")     Topic started 6 years 6 months ago, by [assun](/forum/user/19855-assun "View assun's Profile")       [Last Post](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317155 "Hi,  The line: $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); should be: $myfile = $fieldsClass-&gt;show($oneExtraField,$this-&gt;row-&gt;$fieldName); in your previous code.  Now, the error &quot;Call to undefined method hikashop::show()&quot; cannot happen with your previous code. That would indicate that $fieldsClass is of the class &quot;hikashop&quot; which is not possible. So you must have changed something else.  And it's normal that $field-&gt;field&#95;value is empty as this variable contains the list of values to choose from in dropdowns, radio / checkbox lists, etc. If you don't want to use the show function, you can directly do: $myfile = $this-&gt;row-&gt;$fieldName; This should display the same thing as with the call to the show function for custom fields of the type &quot;text&quot;.") 6 years 6 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:3  Views:288 | [Last Post](/forum/26-product-category-display/899462-custom-fields-value-in-product-listing#317155 "Hi,  The line: $myfile = $fieldsClass-&gt;show($val,$this-&gt;row-&gt;$key); should be: $myfile = $fieldsClass-&gt;show($oneExtraField,$this-&gt;row-&gt;$fieldName); in your previous code.  Now, the error &quot;Call to undefined method hikashop::show()&quot; cannot happen with your previous code. That would indicate that $fieldsClass is of the class &quot;hikashop&quot; which is not possible. So you must have changed something else.  And it's normal that $field-&gt;field&#95;value is empty as this variable contains the list of values to choose from in dropdowns, radio / checkbox lists, etc. If you don't want to use the show function, you can directly do: $myfile = $this-&gt;row-&gt;$fieldName; This should display the same thing as with the call to the show function for custom fields of the type &quot;text&quot;.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      6 years 6 months ago |
| [](/forum/26-product-category-display/890338-remove-text-after-read-more-in-product-option-i-icon#269992) | [Remove text after "read more" in Product option "i" icon](/forum/26-product-category-display/890338-remove-text-after-read-more-in-product-option-i-icon#269992 "Hi, How to remove text after , when point &quot;i&quot; icon on product option? Untitled-1.jpg  I edited the file &quot;product / option.php&quot;:  Somehow it gets ok, but it remains  and  ... Untitled-2.jpg  Thanks")         Category: [Product &amp; Category Display](/forum/26-product-category-display "Questions about product and category display. You can't find how to make Hikashop looks incredible? The answer is here!")     Topic started 9 years 5 months ago, by [assun](/forum/user/19855-assun "View assun's Profile")       [Last Post](/forum/26-product-category-display/890338-remove-text-after-read-more-in-product-option-i-icon#269994 "Hello,  Product&#95;description comes with &quot;&lt;p&gt;&quot; &amp; &quot;&lt;/p&gt;&quot;, and so maybe you can try to modify text and remove them, something like this kind :  and then, display your string.  Hope this will help you.  Regards") 9 years 5 months ago     by [Philip](/forum/user/34318-philip "View Philip's Profile") | Replies:1  Views:553 | [Last Post](/forum/26-product-category-display/890338-remove-text-after-read-more-in-product-option-i-icon#269994 "Hello,  Product&#95;description comes with &quot;&quot; &amp; &quot;&quot;, and so maybe you can try to modify text and remove them, something like this kind :  and then, display your string.  Hope this will help you.  Regards") by [Philip](/forum/user/34318-philip "View Philip's Profile")      9 years 5 months ago |

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.083 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
