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

#   Template override for the characteristics

##

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

Less More

- Posts: 8
- Thank you received: 1
-
-

12 years 3 weeks ago -  12 years 3 weeks ago [\#173960](#173960) by [mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile")  *[Template override for the characteristics](/forum/31-development/872026-template-override-for-the-characteristics#173960 "-- HikaShop version -- : 3 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.5.13 -- Browser(s) name and version -- : Chrome  Hi,  I'm looking for more documentation on the Template override for the characteristics. More than this page suggest :   www.hikashop.com/support/documentation/6...tation.html#override  My goal is to move :  table class=&quot;hikashop&#95;product&#95;characteristics&#95;table&quot;&gt;  between :    and the button add to cart.  Thanks.  (Look at the image attached for the final result wanted)")* was created by *[mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile")*

-- HikaShop version -- : 3
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.5.13
-- Browser(s) name and version -- : Chrome

Hi,

I'm looking for more documentation on the Template override for the characteristics. More than this page suggest : [ www.hikashop.com/support/documentation/6...tation.html#override](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#override)

My goal is to move :

table class="hikashop_product_characteristics_table"&gt;

between :

&lt;input id="hikashop_product_quantity_field_1" type="text" value="1" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_1',0,1);"&gt;

and the button add to cart.

Thanks.

(Look at the image attached for the final result wanted)

- [ ![img.jpg](/forum/attachment/19899) ](/forum/attachment/19899 "img.jpg") [ ](/forum/attachment/19899?download=1 "img.jpg")

Last edit: 12 years 3 weeks ago by [mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile").

The following user(s) said Thank You: [jasmithartist](/forum/user/34152-jasmithartist "View jasmithartist's Profile")

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

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 3 weeks ago [\#173980](#173980) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Template override for the characteristics](/forum/31-development/872026-template-override-for-the-characteristics#173980 "-- HikaShop version -- : 3 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.5.13 -- Browser(s) name and version -- : Chrome  Hi,  I'm looking for more documentation on the Template override for the characteristics. More than this page suggest :   www.hikashop.com/support/documentation/6...tation.html#override  My goal is to move :  table class=&quot;hikashop&#95;product&#95;characteristics&#95;table&quot;&gt;  between :    and the button add to cart.  Thanks.  (Look at the image attached for the final result wanted)")*

Hi,

We don't have more documentation on that subject.
But the characteristics display override is not the way to go anyway in your case.
You'll have instead to do two things:
1. edit the file "show_default" via the menu Display&gt;Views and add some ob_start/ob_get_clean around the characteristic area in order to get the HTML of the characteristic display.
2. In that same file, remove the add to cart button display code and add your own HTML with the quantity box/add to cart button placed around the characteristic HTML. You'll want to be careful when you do that since the characteristic selection refreshes the quantity field/add to cart area for the current variant so you'll probably want to change the id of the area to deactivate the refresh on that part.

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

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

Less More

- Posts: 8
- Thank you received: 1
-
-

12 years 3 weeks ago -  12 years 3 weeks ago [\#174086](#174086) by [mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile")  Replied by *[mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile")* on topic *[Template override for the characteristics](/forum/31-development/872026-template-override-for-the-characteristics#174086 "-- HikaShop version -- : 3 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.5.13 -- Browser(s) name and version -- : Chrome  Hi,  I'm looking for more documentation on the Template override for the characteristics. More than this page suggest :   www.hikashop.com/support/documentation/6...tation.html#override  My goal is to move :  table class=&quot;hikashop&#95;product&#95;characteristics&#95;table&quot;&gt;  between :    and the button add to cart.  Thanks.  (Look at the image attached for the final result wanted)")*

Thanks for the reply.

**When I put ob\_start(); and ob\_get\_clean(); around the characteristic, it removed it.**
Code:

&lt;?php ob_start(); if($this-&gt;params-&gt;get('characteristic_display')!='list'){ $this-&gt;setLayout('show_block_characteristic'); echo $this-&gt;loadTemplate(); ob_get_clean(); ?&gt;

Also, the quantity box/add to cart button, don't display well when I just copy and paste the HTML.

**Here's the HTML that I copied and pasted :**
Code:

&lt;input id="hikashop_product_quantity_field_1" type="text" value="1" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_1',0,1);"&gt;

[/code]
Code:

&lt;input type="submit" class="btn button hikashop_cart_input_button" name="add" value="Ajouter au panier" onclick="var field=document.getElementById('hikashop_product_quantity_field_1');if(hikashopCheckChangeForm('item','hikashop_product_form')){ return hikashopModifyQuantity('192059',field,1,0,'cart'); } else { return false; }"&gt;

**So, if I do want you day, the final code should like (???) :**

Code:

&lt;?php ob_start(); echo '&lt;input id=\"hikashop_product_quantity_field_1\" type=\"text\" value=\"1\" class=\"hikashop_product_quantity_field\" name=\"quantity\" onchange=\"hikashopCheckQuantityChange(\'hikashop_product_quantity_field_1\',0,1);"&gt;'; if($this-&gt;params-&gt;get('characteristic_display')!='list'){ $this-&gt;setLayout('show_block_characteristic'); echo $this-&gt;loadTemplate(); echo '&lt;input type=\"submit\" class=\"btn button hikashop_cart_input_button\" name=\"add\" value=\"Ajouter au panier\" onclick=\"var field=document.getElementById(\'hikashop_product_quantity_field_1\');if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'192059\',field,1,0,\'cart\'); } else { return false; }"&gt;'; ob_get_clean(); ?&gt;

But it doesn't work... : (

Last edit: 12 years 3 weeks ago by [mm.carier](/forum/user/34358-mm-carier "View mm.carier's Profile").

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

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 3 weeks ago [\#174109](#174109) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Template override for the characteristics](/forum/31-development/872026-template-override-for-the-characteristics#174109 "-- HikaShop version -- : 3 -- Joomla version -- : 3.3.1 -- PHP version -- : 5.5.13 -- Browser(s) name and version -- : Chrome  Hi,  I'm looking for more documentation on the Template override for the characteristics. More than this page suggest :   www.hikashop.com/support/documentation/6...tation.html#override  My goal is to move :  table class=&quot;hikashop&#95;product&#95;characteristics&#95;table&quot;&gt;  between :    and the button add to cart.  Thanks.  (Look at the image attached for the final result wanted)")*

Hi,

These are general hints so that you can get going if you already know what you're doing.
You can't just copy/paste around the code, that won't work. It's much more complex to do.

For example, the goal of ob_get_clean is to flush the buffer and return the content of the buffer.
So of course, if you don't do anything with the return, it won't display the content of the buffer at all.
So instead of :
ob_get_clean();
you should have something like this:
$characteristics_html = ob_get_clean();
And then have a :
echo $characteristics_html;
where you want it to display, in between the quantity input and the add to cart.

And you can't just copy/paste the HTML of the quantity/add to cart button. The code needs to be dynamic (the product_id mainly which needs to be displayed from the product data).

If you don't feel you can do it on your own, I would recommend to contact our partners for a quote on that customization project:
[ www.hikashop.com/home/our-partners.html](http://www.hikashop.com/home/our-partners.html)

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

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

[](#top)
