How to change checkout page?

  • Posts: 65
  • Thank you received: 5
  • Hikashop Business
3 days 6 hours ago #367032

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.4.6

Hi!

Currently my checkout page looks like this:



Problem is, if the customer is not ticking the "terms and conditions" checkbox (in my screenshot: "Ich habe die Allgemeinen Geschäftsbedingungen gelesen und akzeptiere sie.") and clicks on "Kaufen" then the site would reload - and it SEEMS nothing else happens. Thing is, actually - if I scroll down - I find the notice (marked in my screenshot). But this is not really user friendly. If the reload appears, the notice should be displayed on top of the site, so the customer can see it immediately.

So let me ask the following points:
a) How to move this notice to the top of the site?*
b) How to change the text of this notice (couldn't find it)?

* One thought: If this notice is linked and executed near to its field then maybe it's difficult to move it to the top of the site. If so, would it be a solution that the reload of the page would directly scroll down to the field?

Cheers
Rusty

Attachments:

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

  • Posts: 83766
  • Thank you received: 13555
  • MODERATOR
3 days 2 hours ago #367033

Hi,

The fact that the message is not displayed at the top is normal.
The goal is to make it easier to match the message with the part that needs to be corrected.
Now, normally, when the checkout has to display an error message like that, it will automatically scroll down to the error message.
That way, the user can't miss it.
From what you're saying, it seems that this is not the case. I'm not sure why that would not be the case. Unfortunately, you didn't provide the URL of the website so I can't check the situation to see why the scroll down system is not working.
Also, from your screenshot, I can see that the message is not really visible. Normally, it will display with a red background so that the customer can't miss it.

a. Moving the message to the top is possible.
You would have to, first, edit the file checkout / show_block_terms via the menu Display>Views and remove the line:

$this->checkoutHelper->displayMessages('terms_' . $this->step . '_' .  $this->module_position);
And then, edit the file checkout / show, and add code like this at the top:
<?php $this->checkoutHelper->displayMessages('terms_XXX_YYY'); ?>
where XXX is to be replaced by the step number and YYY by the position of the terms and conditions view in the step.
Not knowing how your checkout workflow is configured at the moment, I can't give you the exact values to use.

b. This is a normal text of HikaShop. You can use a translation override to change it:
www.hikashop.com/download/languages.html#modify
The translation key is PLEASE_ACCEPT_TERMS_BEFORE_FINISHING_ORDER

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

  • Posts: 65
  • Thank you received: 5
  • Hikashop Business
2 days 7 hours ago #367045

Hi,

nicolas wrote: Moving the message to the top is possible.
You would have to, first, edit the file checkout / show_block_terms via the menu Display>Views and remove the line:

$this->checkoutHelper->displayMessages('terms_' . $this->step . '_' .  $this->module_position);
And then, edit the file checkout / show, and add code like this at the top:
<?php $this->checkoutHelper->displayMessages('terms_XXX_YYY'); ?>
where XXX is to be replaced by the step number and YYY by the position of the terms and conditions view in the step.
Not knowing how your checkout workflow is configured at the moment, I can't give you the exact values to use.


Hm ... let's see if I got you right.
I have step 2 and element 5 in there. So the code should look like this:
<?php $this->checkoutHelper->displayMessages('terms_2_5'); ?>

But this doesn't work.
My step 2 is configured as follows (need the position "Allgemeine Geschäftsbedingungen"):



What did I wrong?

Attachments:
Last edit: 2 days 7 hours ago by Rusty.

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

  • Posts: 83766
  • Thank you received: 13555
  • MODERATOR
1 day 22 hours ago #367054

Hi,

Sorry, for the position in the step, you need to start counting at 0 not 1.
So, in your case, the code should be:

<?php $this->checkoutHelper->displayMessages('terms_2_4'); ?>

The following user(s) said Thank You: Rusty

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

Time to create page: 0.069 seconds
Powered by Kunena Forum