- Posts: 25
- Thank you received: 2
SOLVED - Product code display
I need to display the product code near the product name (Joomla! 2.5.6, HikaShop Business 1.5.
I found how to do that in the hikashop's documentation ( www.hikashop.com/support/documentation/8...ng.html#product_code ).
I removed ".hikashop_product_code_main{ display:none; }" from the frontend_custom.css file but the code doesn't show up.
Joomla! 2.5.6
Hikashop Business 1.6.0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I kept the line ".hikashop_product_code_main{ display:none; }" replacing the "none" value with "inline".
But I want to show the product code below the product name, with different text format and preceded with the words "Product code".
for example:
Product name
Product code: 1234
What I must edit for that?
Joomla! 2.5.6
Hikashop Business 1.6.0
Please Log in or Create an account to join the conversation.
echo $this->element->product_code;
to:
echo '<br/>Product code: '.$this->element->product_code;
Please Log in or Create an account to join the conversation.
- Posts: 38
- Thank you received: 0
I tried the noted change, but it did not work for me. When I made the code change, the product page would not load and indicated that either the website was down for maintenance or that there was a programming error. Do you recommend any way for me to get this to work?
Also, when I do get it to work, how would I get the page to display the product code in a smaller font just as the other poster showed.
Thank you!
Please Log in or Create an account to join the conversation.
It means that you didn't do the modification properly.
Please do a screenshot of your modification so that we can see what you did.
Also, if you want to change the font size, you can do like that:
echo '<br/>Product code: <span style="font-size:12px;">'.$this->element->product_code.'</span>';
Please Log in or Create an account to join the conversation.
This is what I've done for my case:
- for displaying the product code under the product name, with a different format (for example: paradoxshop.ro/index.php/produs/273-capa...ta-atos-set-4-bucati ), I edited two files:
1. show_reversed.php (because I use the reversed view for the product display) from HikaShop menu: Display\Views, frontend.
original:
</span>
<?php if ($this->config->get('show_code')) { ?>
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo $this->element->product_code;
?>
</span>
modified:
</span>
<?php if ($this->config->get('show_code')) { ?>
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo "<br />Cod produs: ";
echo $this->element->product_code;
?>
</span>
2. frontend_custom.css: I added my wanted format.
/* different parts of the show of a product */
...
.hikashop_product_code_main{
display:inline;
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:14px;
color: #7f7f7f;
Joomla! 2.5.6
Hikashop Business 1.6.0
Please Log in or Create an account to join the conversation.
- Posts: 38
- Thank you received: 0
I was able to get this to work. I did use donig's method and it worked perfectly.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
echo '<br/>Product code: '.$this->element->product_code;
you can use:
echo '<br/>'.JText::_('MY_TRANSLATION').': '.$this->element->product_code;
and then add the translation key MY_TRANSLATION to the override area of each one of your languages via the Languages tab of the configuration like that:
MY_TRANSLATION="My text"
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
www.dropbox.com/s/yquia30ol79996t/Screen...12-19%2021.41.52.png
www.dropbox.com/s/1a9z9b3jjwki9is/Screen...12-19%2021.41.59.png
How can you help me?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
www.dropbox.com/s/9se60v6i7fy79a5/Screen...12-20%2002.13.18.png
www.dropbox.com/s/6t4sw364hlffds5/Screen...12-20%2002.14.39.png
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.