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

#   move code into tabber in product view

##

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

Less More

- Posts: 72
- Thank you received: 2
-
-

13 years 9 months ago [\#88219](#88219) by [thomas.boepple](/forum/user/6332-thomas-boepple "View thomas.boepple's Profile")  *[move code into tabber in product view](/forum/2-general-talk-about-hikashop/77962-move-code-into-tabber-in-product-view#88219 "This is the URL   www.juzodesign.com/index.php/shop/produc...se-with-lace-ruffles  I have moved size, price and cart button into a tab.(jtabber)  I would like to display size, price and add to cart in one line - how should I change the code?  This is my php:  {tab=Portrait} setLayout('show&#95;block&#95;characteristic'); echo $this-&gt;loadTemplate(); ?&gt;   params-&gt;get('show&#95;price')) { $this-&gt;row = &amp; $this-&gt;element; $this-&gt;setLayout('listing&#95;price'); echo $this-&gt;loadTemplate(); } ?&gt;   row = &amp; $this-&gt;element; $this-&gt;ajax = 'if(hikashopCheckChangeForm(&#92;'item&#92;',&#92;'hikashop&#95;product&#95;form&#92;')){ return hikashopModifyQuantity(&#92;'' . $this-&gt;row-&gt;product&#95;id . '&#92;',field,1' . $form . ',&#92;'cart&#92;'); } else { return false; }'; $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); ?&gt;   php echo JHTML::&#95;('content.prepare',preg&#95;replace('##i','',$this-&gt;element-&gt;product&#95;description)); ?&gt;    element-&gt;product&#95;url)) { echo JText :: sprintf('MANUFACTURER&#95;URL', '' . $this-&gt;element-&gt;product&#95;url . ''); } ?&gt;   setLayout('show&#95;block&#95;product&#95;files'); echo $this-&gt;loadTemplate(); ?&gt;  params-&gt;get('show&#95;vote&#95;product')){ $js = ''; if(isset($this-&gt;element-&gt;main)){ $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; }else{ $product&#95;id = $this-&gt;element-&gt;product&#95;id; } $this-&gt;params-&gt;set('product&#95;id',$product&#95;id); echo hikashop&#95;getLayout('vote', 'listing', $this-&gt;params, $js); ?&gt;   element-&gt;product&#95;id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product&#95;name)){ $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; $product&#95;name = $this-&gt;element-&gt;main-&gt;product&#95;name; }else{ $product&#95;id = $this-&gt;element-&gt;product&#95;id; $product&#95;name = $this-&gt;element-&gt;product&#95;name; } echo JComments::showComments($product&#95;id, 'com&#95;hikashop', $product&#95;name); } } elseif ($config-&gt;get('comments&#95;feature') == 'jomcomment') { $comments = HIKASHOP&#95;ROOT . 'plugins' . DS . 'content' . DS . 'jom&#95;comment&#95;bot.php'; if (file&#95;exists($comments)) { require&#95;once ($comments); if (hikashop&#95;getCID('product&#95;id')!=$this-&gt;element-&gt;product&#95;id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product&#95;name)) $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; else $product&#95;id = $this-&gt;element-&gt;product&#95;id; echo jomcomment($product&#95;id, 'com&#95;hikashop'); } } ?&gt;   {/tabs}")* was created by *[thomas.boepple](/forum/user/6332-thomas-boepple "View thomas.boepple's Profile")*

This is the URL
[ www.juzodesign.com/index.php/shop/produc...se-with-lace-ruffles](http://www.juzodesign.com/index.php/shop/product/35-luxury-line-petticoat-broderie-anglaise-with-lace-ruffles)

I have moved **size, price** and **cart button** into a tab.(jtabber)

I would like to display **size**, **price** and **add to cart** in one line - how should I change the code?

This is my php:

{tab=Portrait}
&lt;?php
$this-&gt;setLayout('show_block_characteristic');
echo $this-&gt;loadTemplate();
?&gt;

&lt;span id="hikashop_product_price_main" class="hikashop_product_price_main"&gt;
&lt;?php
if ($this-&gt;params-&gt;get('show_price')) {
$this-&gt;row = &amp; $this-&gt;element;
$this-&gt;setLayout('listing_price');
echo $this-&gt;loadTemplate();
}
?&gt;
&lt;/span&gt;
&lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;
&lt;?php
$this-&gt;row = &amp; $this-&gt;element;
$this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this-&gt;row-&gt;product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
$this-&gt;setLayout('quantity');
echo $this-&gt;loadTemplate();
?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_description_main" class="hikashop_product_description_main"&gt;
&lt;?php
echo JHTML::_('content.prepare',preg_replace('#&lt;hr *id="system-readmore" */&gt;#i','',$this-&gt;element-&gt;product_description));
?&gt;
&lt;/div&gt;

&lt;span id="hikashop_product_url_main" class="hikashop_product_url_main"&gt;
&lt;?php
if (!empty ($this-&gt;element-&gt;product_url)) {
echo JText :: sprintf('MANUFACTURER_URL', '&lt;a href="' . $this-&gt;element-&gt;product_url . '" target="_blank"&gt;' . $this-&gt;element-&gt;product_url . '&lt;/a&gt;');
}
?&gt;
&lt;/span&gt;

&lt;?php
$this-&gt;setLayout('show_block_product_files');
echo $this-&gt;loadTemplate();
?&gt;
&lt;div id="hikashop_product_vote_listing" class="hikashop_product_vote_listing"&gt;
&lt;?php
if($this-&gt;params-&gt;get('show_vote_product')){
$js = '';
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('product_id',$product_id);
echo hikashop_getLayout('vote', 'listing', $this-&gt;params, $js);
?&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_vote_form" class="hikashop_product_vote_form"&gt;
&lt;?php
$js = '';
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('product_id',$product_id);
echo hikashop_getLayout('vote', 'form', $this-&gt;params, $js);
}
?&gt;
&lt;/div&gt;
{tab=Comments}
&lt;div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both"&gt;
&lt;?php
$config = &amp; hikashop_config();
if ($config-&gt;get('comments_feature') == 'jcomments') {
$comments = HIKASHOP_ROOT . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this-&gt;element-&gt;product_id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product_name)){
$product_id = $this-&gt;element-&gt;main-&gt;product_id;
$product_name = $this-&gt;element-&gt;main-&gt;product_name;
}else{
$product_id = $this-&gt;element-&gt;product_id;
$product_name = $this-&gt;element-&gt;product_name;
}
echo JComments::showComments($product_id, 'com_hikashop', $product_name);
}
}
elseif ($config-&gt;get('comments_feature') == 'jomcomment') {
$comments = HIKASHOP_ROOT . 'plugins' . DS . 'content' . DS . 'jom_comment_bot.php';
if (file_exists($comments)) {
require_once ($comments);
if (hikashop_getCID('product_id')!=$this-&gt;element-&gt;product_id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product_name))
$product_id = $this-&gt;element-&gt;main-&gt;product_id;
else
$product_id = $this-&gt;element-&gt;product_id;
echo jomcomment($product_id, 'com_hikashop');
}
}
?&gt;
&lt;/div&gt;
&lt;/div&gt;
{/tabs}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc3OTYyLW1vdmUtY29kZS1pbnRvLXRhYmJlci1pbi1wcm9kdWN0LXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 72
- Thank you received: 2
-
-

13 years 9 months ago [\#88309](#88309) by [thomas.boepple](/forum/user/6332-thomas-boepple "View thomas.boepple's Profile")  Replied by *[thomas.boepple](/forum/user/6332-thomas-boepple "View thomas.boepple's Profile")* on topic *[move code into tabber in product view](/forum/2-general-talk-about-hikashop/77962-move-code-into-tabber-in-product-view#88309 "This is the URL   www.juzodesign.com/index.php/shop/produc...se-with-lace-ruffles  I have moved size, price and cart button into a tab.(jtabber)  I would like to display size, price and add to cart in one line - how should I change the code?  This is my php:  {tab=Portrait} setLayout('show&#95;block&#95;characteristic'); echo $this-&gt;loadTemplate(); ?&gt;   params-&gt;get('show&#95;price')) { $this-&gt;row = &amp; $this-&gt;element; $this-&gt;setLayout('listing&#95;price'); echo $this-&gt;loadTemplate(); } ?&gt;   row = &amp; $this-&gt;element; $this-&gt;ajax = 'if(hikashopCheckChangeForm(&#92;'item&#92;',&#92;'hikashop&#95;product&#95;form&#92;')){ return hikashopModifyQuantity(&#92;'' . $this-&gt;row-&gt;product&#95;id . '&#92;',field,1' . $form . ',&#92;'cart&#92;'); } else { return false; }'; $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); ?&gt;   php echo JHTML::&#95;('content.prepare',preg&#95;replace('##i','',$this-&gt;element-&gt;product&#95;description)); ?&gt;    element-&gt;product&#95;url)) { echo JText :: sprintf('MANUFACTURER&#95;URL', '' . $this-&gt;element-&gt;product&#95;url . ''); } ?&gt;   setLayout('show&#95;block&#95;product&#95;files'); echo $this-&gt;loadTemplate(); ?&gt;  params-&gt;get('show&#95;vote&#95;product')){ $js = ''; if(isset($this-&gt;element-&gt;main)){ $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; }else{ $product&#95;id = $this-&gt;element-&gt;product&#95;id; } $this-&gt;params-&gt;set('product&#95;id',$product&#95;id); echo hikashop&#95;getLayout('vote', 'listing', $this-&gt;params, $js); ?&gt;   element-&gt;product&#95;id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product&#95;name)){ $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; $product&#95;name = $this-&gt;element-&gt;main-&gt;product&#95;name; }else{ $product&#95;id = $this-&gt;element-&gt;product&#95;id; $product&#95;name = $this-&gt;element-&gt;product&#95;name; } echo JComments::showComments($product&#95;id, 'com&#95;hikashop', $product&#95;name); } } elseif ($config-&gt;get('comments&#95;feature') == 'jomcomment') { $comments = HIKASHOP&#95;ROOT . 'plugins' . DS . 'content' . DS . 'jom&#95;comment&#95;bot.php'; if (file&#95;exists($comments)) { require&#95;once ($comments); if (hikashop&#95;getCID('product&#95;id')!=$this-&gt;element-&gt;product&#95;id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product&#95;name)) $product&#95;id = $this-&gt;element-&gt;main-&gt;product&#95;id; else $product&#95;id = $this-&gt;element-&gt;product&#95;id; echo jomcomment($product&#95;id, 'com&#95;hikashop'); } } ?&gt;   {/tabs}")*

Solved

I just moved it into a table.

here is the code

{tab=Portrait}
&lt;table width="100%" border="0"&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;!-- drop down size --&gt;
&lt;?php
$this-&gt;setLayout('show_block_characteristic');
echo $this-&gt;loadTemplate();
?&gt;&lt;/td&gt;

&lt;td&gt; &lt;!-- add to cart --&gt;
&lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;
&lt;?php
$this-&gt;row = &amp; $this-&gt;element;
$this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this-&gt;row-&gt;product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
$this-&gt;setLayout('quantity');
echo $this-&gt;loadTemplate();
?&gt;
&lt;/div&gt;

&lt;/td&gt;
&lt;td&gt;&lt;!-- product price --&gt;
&lt;span id="hikashop_product_price_main" class="hikashop_product_price_main"&gt;
&lt;?php
if ($this-&gt;params-&gt;get('show_price')) {
$this-&gt;row = &amp; $this-&gt;element;
$this-&gt;setLayout('listing_price');
echo $this-&gt;loadTemplate();
}
?&gt;
&lt;/span&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc3OTYyLW1vdmUtY29kZS1pbnRvLXRhYmJlci1pbi1wcm9kdWN0LXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.063 seconds

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

[](#top)
