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

#   Show Hikamarket items in show\_block\_characteristic

##

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

8 years 9 months ago [\#287289](#287289) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  *[Show Hikamarket items in show\_block\_characteristic](/forum/23-market-how-to/893705-show-hikamarket-items-in-show-block-characteristic#287289 "Hi try to add items from HikaMarket but do not want to show up in show&#95;block&#95;characteristic. I tried to get a vendor's name through this code:  or  But without success. Where have I been wrong?")* was created by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")*

Hi try to add items from HikaMarket but do not want to show up in show_block_characteristic.
I tried to get a vendor's name through this code: Code:

if(!defined('HIKAMARKET_COMPONENT')) include_once rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_hikamarket'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php'; $vendorClass = hikamarket::get('class.vendor'); $vendor = $vendorClass-&gt;get( $vendor_id ); echo $vendor-&gt;vendor_name;

or Code:

if(!defined('HIKAMARKET_COMPONENT')) include_once rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_hikamarket'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php'; $vendorClass = hikamarket::get('class.vendor'); $vendor = $vendorClass-&gt;get( $vendor_id ); foreach($vendor as $vendor){ echo $vendor-&gt;vendor_name; }

But without success. Where have I been wrong?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODkzNzA1LXNob3ctaGlrYW1hcmtldC1pdGVtcy1pbi1zaG93LWJsb2NrLWNoYXJhY3RlcmlzdGljP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

8 years 9 months ago -  8 years 9 months ago [\#287329](#287329) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Show Hikamarket items in show\_block\_characteristic](/forum/23-market-how-to/893705-show-hikamarket-items-in-show-block-characteristic#287329 "Hi try to add items from HikaMarket but do not want to show up in show&#95;block&#95;characteristic. I tried to get a vendor's name through this code:  or  But without success. Where have I been wrong?")*

Hello I was able to show a vendor's photo using this code. Here I have a problem with the ID of the vendor. Code:

&lt;?php $db = JFactory::getDbo(); $query = $db-&gt;getQuery(true); $query-&gt;from($db-&gt;quoteName('#__hikamarket_vendor')); $query-&gt;select($db-&gt;quoteName(array('vendor_image'))); $db-&gt;setQuery($query); $vendor = $db-&gt;loadObjectList(); foreach($vendor as $vendor){ $vendor_image = null; $imageHelper = hikamarket::get('shop.helper.image'); if(!empty($vendor-&gt;vendor_image)) $vendor_image = $imageHelper-&gt;getThumbnail($vendor-&gt;vendor_image, array(100,100), array()); if(empty($vendor_image) &#124;&#124; !$vendor_image-&gt;success) $vendor_image = $imageHelper-&gt;getThumbnail($this-&gt;config-&gt;get('default_vendor_image', ''), array(100,100), array('default' =&gt; true), true); } ?&gt; &lt;img src="&lt;?php echo @$vendor_image-&gt;url; ?&gt;" alt=""/&gt;

But for the vendor vote I will need some help. This is the code I use. I found the code to extract the database but there is some problem. Code:

&lt;?php $db = JFactory::getDbo(); $query = $db-&gt;getQuery(true); $query = 'SELECT vote.vote_id, vote.vote_type, vote.vote_ref_id, vendor.vendor_id, vendor.vendor_average_score as &#96;average_score&#96;, vendor.vendor_total_vote as &#96;total_vote&#96; '. ' FROM '.hikamarket::table('vendor').' as vendor '. ' INNER JOIN '.hikamarket::table('shop.vote').' AS vote ON (vote.vote_ref_id = vendor.vendor_id AND vote.vote_type = '.$db-&gt;Quote('vendor').') '. ' WHERE vote.vote_id IN ('.implode(',', $elements).')'; $db-&gt;setQuery($query); $vote = $db-&gt;loadObjectList(); foreach($vote as $vote){ $voteParams = new HikaParameter(); $voteParams-&gt;set('vote_type', 'vendor'); $voteParams-&gt;set('vote_ref_id', $this-&gt;row-&gt;vendor_id); $js = ''; echo hikamarket::getLayout('shop.vote', 'mini', $voteParams, $js); } ?&gt;

Last edit: 8 years 9 months ago by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODkzNzA1LXNob3ctaGlrYW1hcmtldC1pdGVtcy1pbi1zaG93LWJsb2NrLWNoYXJhY3RlcmlzdGljP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.048 seconds

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