Is it a bug?

  • Posts: 120
  • Thank you received: 1
12 years 2 months ago #62281

Hi All,

Can you see the below attached screenshot?
When I enter incorrect coupon code, this message appears: "COUPON_NOT_VALID"
However, the value for this string is clearly defined in language file (this is also seen from screenshot).

When I delete a coupon, translation of the message "Coupon Deleted" appears correctly.

Can you tell me how to solve this issue?


Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
12 years 2 months ago #62315

Hi watashi,

The translation has the good syntax, I can't reproduce the bug on my end.
Please check if the code for the translation in \administrator\components\com_hikashop\classes\discount.php is correct, it must be like
:

$error_message = JText::_('COUPON_NOT_VALID');

Maybe try to clear the cache.

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
12 years 2 months ago #62404

You should try to turn on the debug language option of the joomla configuration. At the bottom of each pages, it will list all the language files loaded and will tell you which one have an error in them and on which line.

That should help you find the issue with the modification.

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

  • Posts: 120
  • Thank you received: 1
12 years 2 months ago #62474

The code in discount.php seems correct:

$error_message = JText::_('COUPON_NOT_VALID');

After I switched on Language Debug mode, the following errors occured, which seems to have nothing to do with HikaShop:
JROOT/templates/rt_voxel/language/en-GB/en-GB.tpl_rt_voxel.ini  имеются ошибки в строках 138, 172, 173, 183
JROOT/language/en-GB/en-GB.mod_roknavmenu.ini  имеются ошибки в строках 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

Can it be the cause? Unfortunately, I can not identify what is wrong. For example, line 138 in tpl_rt_voxel.ini says:
SIDEMENU_TITLE=Side Menu Title
It seems the reason of error are missing quote brackets. But how it can influence to our coupon_not_valid issue?

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

  • Posts: 120
  • Thank you received: 1
12 years 2 months ago #62486

Just FYI,
I have also downloaded a fresh translation file from backend by pressing button "Load the latest version from our server" in Hikashop's language panel.
I have removed all language overrides and saved this virgin file.
This did not help.

I also have AwoCoupon Pro installed. Can it be the cause? It has inserted the following code in discount.php file:

# awocoupon_code START ===============================================================
$do=true;
JPluginHelper::importPlugin( 'hikashop' );
$dispatcher =& JDispatcher::getInstance();
$item = $dispatcher->trigger( 'onBeforeCouponLoad', array( &$coupon, & $do) );
if(!$do) return current($item);
# awocoupon_code END =================================================================

In debug mode I have following files, which were not loaded:
**Не загружен** : JROOT/language/ru-RU/ru-RU.mod_hikashop_cart.ini
**Не загружен** : JROOT/modules/mod_hikashop_cart/language/ru-RU/ru-RU.mod_hikashop_cart.ini
**Не загружен** : JROOT/language/en-GB/en-GB.mod_hikashop_cart.ini
**Не загружен** : JROOT/modules/mod_hikashop_cart/language/en-GB/en-GB.mod_hikashop_cart.ini

I have following strings which are detected as "not translated" when Language Debug mode is ON:
# JROOT/libraries/joomla/application/component/view.php

DISPLAY_THE_CART="THE CART"
PRICE_BEGINNING_0="BEGINNING 0"
PRICE_ENDING_0="ENDING 0"

I have also made a language override for COUPON_NOT_VALID, which did not work for me as well..

I have cleared browser's cash. I have also tried to see the page from another browser on another PC under different OS.

What else can I try? Any idea?...

sd

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

  • Posts: 13201
  • Thank you received: 2322
12 years 2 months ago #62520

Hi watashi,

Maybe AwoCoupon got the same text to translate than HikaShop, try to change the code in discount.php from COUPON_NOT_VALID to HIKA_COUPON_NOT_VALID
And change it too in the translation file.

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

  • Posts: 120
  • Thank you received: 1
12 years 2 months ago #62523

Thanks for advice. I have replaced it as per your advice in both php and language files.
However, I still get the same message COUPON_NOT_VALID.
In such a case I understand that it is generated not by Hikashop, but by AwoCoupon.
I have contacted AwoCoupon team and will wait for their reply.

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

  • Posts: 120
  • Thank you received: 1
12 years 2 months ago #62527

This solution worked for me:
awodev.com/forum/awocoupon/help-section/couponnotvalid

So the bug was at AwoCoupon's side.

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
12 years 2 months ago #62688

Thank you for your feedback.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum