wrong coupon / no terms accepted:notice vs message

  • Posts: 154
  • Thank you received: 4
11 years 1 month ago #164349

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3

dear team, i was wondering why this is like that:

A. if i enter a wrong coupon then a system message appears which is styled as "notice"
on the other hand
B. if i don't accept terms and conditions then a system message appears which is styled as "message"

by default "notice" is redish yellow and "message" bluish...
but both should be the same because both are a wrong entry / an error!
does that make sense to you as well?

is there any place to change B. to "notice" ?

otherwise i would have to change the style for "message" to be the same as for "notice" which does not make sense, as a "real" system message would appear redish as well...

Last edit: 11 years 1 month ago by olivnewton.

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

  • Posts: 84218
  • Thank you received: 13670
  • MODERATOR
11 years 4 weeks ago #164429

Hi,

We just considered that not clicking on the T&C checkbox is not an error, just something the user forgot, while the wrong coupon code is really something the user typed wrong and decided to display the messages in different types.

If you want to change that on your end, you can change the line:
$app->enqueueMessage(JText::_('PLEASE_ACCEPT_TERMS_BEFORE_FINISHING_ORDER'));
to:
$app->enqueueMessage(JText::_('PLEASE_ACCEPT_TERMS_BEFORE_FINISHING_ORDER'),'notice');
in the file components/com_hikashop/controllers/checkout.php

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

  • Posts: 154
  • Thank you received: 4
11 years 4 weeks ago #164513

i see, but i recon if a selection as terms is required, then not selecting it is an error...
thanks, i will try your suggestion.
i guess though i would need to keep track of the updates in order to reapply the change afterwards?

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

  • Posts: 84218
  • Thank you received: 13670
  • MODERATOR
11 years 4 weeks ago #164555

Yes, we don't plan on changing that for now so you'll have to reapply it if you update.
That is unless you apply the change as a class override plugin... by copying the file to
templates/YOUR_TEMPLATE/html/com_hikashop/administrator/controllers/checkout.override.php
and then changing the class name at the beginning from checkoutController to checkoutControllerOverride

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

  • Posts: 154
  • Thank you received: 4
11 years 4 weeks ago #164641

great that there is an override option, but unfortunately this doesnt work...
(it works though if i make the change directly to checkout.php)

is the path correct?
templates/YOUR_TEMPLATE/html/com_hikashop/administrator/controllers/checkout.override.php

is the change in checkout.override.php also correct?
class checkoutControllerOverride extends hikashopController {

Last edit: 11 years 4 weeks ago by olivnewton.

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

  • Posts: 84218
  • Thank you received: 13670
  • MODERATOR
11 years 3 weeks ago #164728

Hi,

My bad, I had forgotten that the controllers cannot be overridden like that, unlike the classes, the types, the helpers, etc.
For a controller, it's a bit more complex. Basically, you need to create a system plugin and include the class from the controller file as is in the plugin file.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum