- Posts: 91
- Thank you received: 3
Product code and price in same row
12 years 7 months ago #142568
by miracle
Product code and price in same row was created by miracle
I want at my product-listing (many items at one page) to display the product code and the product price in one row.
If possible I want the code on the left and the price on the right (float).
I went looking in Views - Product - listing_img_title and found the following to code blocks.
Combining these two should do the trick. But I haven't got a clue how :dry:
Anyobdy any idea?
If possible I want the code on the left and the price on the right (float).
I went looking in Views - Product - listing_img_title and found the following to code blocks.
Combining these two should do the trick. But I haven't got a clue how :dry:
Anyobdy any idea?
Code:
<!-- PRODUCT PRICE -->
<?php
}
if($this->params->get('show_price','-1')=='-1'){
$config =& hikashop_config();
$this->params->set('show_price',$config->get('show_price'));
}
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
<!-- EO PRODUCT PRICE -->
<!-- PRODUCT CODE -->
<span class='hikashop_product_code_list'>
<?php if ($this->config->get('show_code')) { ?>
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>">
<?php }
echo $this->row->product_code;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
<?php } ?>
</span>
<!-- EO PRODUCT CODE -->
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142619
by Eliot
Replied by Eliot on topic Product code and price in same row
Hi there,
First thing is that you have to put these two block next to each other (like in the code you posted).
Then you can actually put them next to each other with some css. Edit the front end css code (in System>Configuration>Display) and add this:
It will prevent the span to be display with the block attribute (meaning on the top of each other).
Do not hesitate to take a look at our documentation for that kind of issue: www.hikashop.com/support/documentation/i...ize-the-display.html
First thing is that you have to put these two block next to each other (like in the code you posted).
Then you can actually put them next to each other with some css. Edit the front end css code (in System>Configuration>Display) and add this:
Code:
.hikashop_product_price_full{
display:inline;
}
.hikashop_product_code_list{
display:inline;
}
It will prevent the span to be display with the block attribute (meaning on the top of each other).
Do not hesitate to take a look at our documentation for that kind of issue: www.hikashop.com/support/documentation/i...ize-the-display.html
The following user(s) said Thank You: miracle
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds