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

#   Product page voting

##

- **[gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")**
- [![gandalf81's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31972-gandalf81 "View gandalf81's Profile") Topic Author
- [ Offline](/forum/user/31972-gandalf81)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#155964](#155964) by [gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")  *[Product page voting](/forum/26-product-category-display/868209-product-page-voting#155964 "Hi guys,  I need one thing....but I dont know how to do.  I need hide voting stars and &quot;contact us&quot; button on product page, but just for one category. All other products ( in other categories) need have voting stars and contact button.  Thanks")* was created by *[gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")*

Hi guys,

I need one thing....but I dont know how to do.

I need hide voting stars and "contact us" button on product page, but just for one category. All other products ( in other categories) need have voting stars and contact button.

Thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 5 months ago [\#156001](#156001) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product page voting](/forum/26-product-category-display/868209-product-page-voting#156001 "Hi guys,  I need one thing....but I dont know how to do.  I need hide voting stars and &quot;contact us&quot; button on product page, but just for one category. All other products ( in other categories) need have voting stars and contact button.  Thanks")*

Hi,

To hide these parts only for one category, you have to edit the view "product / show_default" and add an if condition based on the category around the contact us and vote parts.

An if condition like: Code:

if($this-&gt;element-&gt;product_category_id != XX){ // Vote or contact part. }

You have to set the desired category id instead of XX.

ps: the given code need to be between php tags.

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

- **[gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")**
- [![gandalf81's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31972-gandalf81 "View gandalf81's Profile") Topic Author
- [ Offline](/forum/user/31972-gandalf81)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 5 months ago [\#156056](#156056) by [gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")  Replied by *[gandalf81](/forum/user/31972-gandalf81 "View gandalf81's Profile")* on topic *[Product page voting](/forum/26-product-category-display/868209-product-page-voting#156056 "Hi guys,  I need one thing....but I dont know how to do.  I need hide voting stars and &quot;contact us&quot; button on product page, but just for one category. All other products ( in other categories) need have voting stars and contact button.  Thanks")*

can you be more specific where to put this code. I am not php devolper. Here is part of code I think I need to put code you gave me:

&lt;?php
if(!empty($this-&gt;element-&gt;extraData-&gt;rightBegin))
echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;rightBegin);
?&gt;
&lt;div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"&gt;
&lt;?php
$config =&amp; hikashop_config();
if($this-&gt;params-&gt;get('show_vote_product') == '-1'){
$this-&gt;params-&gt;set('show_vote_product',$config-&gt;get('show_vote_product'));
}
if($this-&gt;params-&gt;get('show_vote_product')){
$js = '';
$this-&gt;params-&gt;set('vote_type','product');
if(isset($this-&gt;element-&gt;main)){
$product_id = $this-&gt;element-&gt;main-&gt;product_id;
}else{
$product_id = $this-&gt;element-&gt;product_id;
}
$this-&gt;params-&gt;set('vote_ref_id',$product_id);
echo hikashop_getLayout('vote', 'mini', $this-&gt;params, $js);
}
?&gt;

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 5 months ago [\#156088](#156088) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Product page voting](/forum/26-product-category-display/868209-product-page-voting#156088 "Hi guys,  I need one thing....but I dont know how to do.  I need hide voting stars and &quot;contact us&quot; button on product page, but just for one category. All other products ( in other categories) need have voting stars and contact button.  Thanks")*

You'll just have to use the code that Xavier said around these lines for the contact button: Code:

?&gt; &lt;div id="hikashop_product_contact_main" class="hikashop_product_contact_main"&gt; &lt;?php $contact = $this-&gt;config-&gt;get('product_contact',0); if (hikashop_level(1) &amp;&amp; ($contact == 2 &#124;&#124; ($contact == 1 &amp;&amp; !empty ($this-&gt;element-&gt;product_contact)))) { $empty = ''; $params = new HikaParameter($empty); global $Itemid; $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&amp;Itemid='.$Itemid; } echo $this-&gt;cart-&gt;displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;element-&gt;product_id.$url_itemid), 'window.location=\'' . hikashop_completeLink('product&amp;task=contact&amp;cid=' . $this-&gt;element-&gt;product_id.$url_itemid) . '\';return false;'); } ?&gt; &lt;/div&gt; &lt;?php

And around these lines for the vote stars : Code:

&lt;div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"&gt; &lt;?php //LAYOUT show the rating stars $config =&amp; hikashop_config(); if($this-&gt;params-&gt;get('show_vote_product') == '-1'){ $this-&gt;params-&gt;set('show_vote_product',$config-&gt;get('show_vote_product')); } if($this-&gt;params-&gt;get('show_vote_product')){ $js = ''; $this-&gt;params-&gt;set('vote_type','product'); if(isset($this-&gt;element-&gt;main)){ $product_id = $this-&gt;element-&gt;main-&gt;product_id; }else{ $product_id = $this-&gt;element-&gt;product_id; } $this-&gt;params-&gt;set('vote_ref_id',$product_id); echo hikashop_getLayout('vote', 'mini', $this-&gt;params, $js); } ?&gt; &lt;/div&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjgyMDktcHJvZHVjdC1wYWdlLXZvdGluZz90bXBsPW1hcmtkb3du) 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?

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

Time to create page: 0.225 seconds

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

[](#top)
