SOLVED - Product code display

  • Posts: 25
  • Thank you received: 2
11 years 9 months ago #59302

Hi,

I need to display the product code near the product name (Joomla! 2.5.6, HikaShop Business 1.5.8).
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
Last edit: 11 years 9 months ago by donig. Reason: SOLVED

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
11 years 9 months ago #59340

Please make sure that the "show product code" option of the configuration is turned on.

The following user(s) said Thank You: donig, max.mandias

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 2
11 years 9 months ago #59361

Yes, it wasn't turned on, now it's ok.
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
Last edit: 11 years 9 months ago by donig.

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
11 years 9 months ago #59420

You will have to edit the file "show_default" of the view "product" via the menu Display->Views and change that line:
echo $this->element->product_code;
to:
echo '<br/>Product code: '.$this->element->product_code;

Last edit: 11 years 8 months ago by nicolas.
The following user(s) said Thank You: donig, max.mandias

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 0
11 years 8 months ago #60935

Hi,

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.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
11 years 8 months ago #61026

Hi,

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.

  • Posts: 25
  • Thank you received: 2
11 years 8 months ago #61100

Hi,

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
Last edit: 11 years 8 months ago by donig.
The following user(s) said Thank You: nicolas, max.mandias

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 0
11 years 8 months ago #61116

Thank you Nicolas and donig!

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.

  • Posts: 100
  • Thank you received: 1
10 years 6 months ago #130542

It works perfectly. But how if we want to do this for two languages? how can we implement this code for two different languages? any suggestions?!

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
10 years 6 months ago #130556

Then instead of :
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

The following user(s) said Thank You: PubSite

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 4 months ago #137253

Dear Nicolas I've been trying to add the same thing to BANK TRANSFER since we use two languages and it doesn't work. it shows me the exact KEY without translating it. Take a look please :
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? :) thanks in advance

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
10 years 4 months ago #137277

Remove all the text in that field and only have a translation key in it. Then, you can add all you text as the translation value of that translation key in each language.

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 4 months ago #137286

All I see is the Key I've entered. BANK_NAME as you can see here : www.dropbox.com/s/cfgxfc95mhe404e/Screen...12-20%2002.04.48.png

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
10 years 4 months ago #137288

Then you didn't add the translation override properly for your BANK_NAME translation key or you have spaces/line returns in that "information" field where you entered your translation key.

Please Log in or Create an account to join the conversation.

  • Posts: 100
  • Thank you received: 1
10 years 4 months ago #137291

Here are two pictures that show how I've entered my Override and Key.. where am I wrong?
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.

  • Posts: 100
  • Thank you received: 1
10 years 4 months ago #137295

I found out the problem I had. Thanks Nicolas, it's now SOLVED and working perfectly. Thanks again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum