- Posts: 32
- Thank you received: 1
Skip "thankyou for your order" for free products, and / or style message
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
5 years 10 months ago #325496
by jeffmcbiscuit
Skip "thankyou for your order" for free products, and / or style message was created by jeffmcbiscuit
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.4
I have some free products on my site, and when I go through checkout with them I'm sent to the generic thankyou page. I understand that each payment plugin has a return url option, but how do I do this for free products? I would just like people to be sent directly to their order.
If it can't be done, can you tell me how to change the styling for the thankyou message? It just uses body text but I don't know what CSS to change to style just this message.
I also have the same issue with the PayPal plugin; I get bumped to a redirect page saying 'now sending you to paypal, or click this button' but I can't for the life of me figure out how to style that message in CSS.
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.4
I have some free products on my site, and when I go through checkout with them I'm sent to the generic thankyou page. I understand that each payment plugin has a return url option, but how do I do this for free products? I would just like people to be sent directly to their order.
If it can't be done, can you tell me how to change the styling for the thankyou message? It just uses body text but I don't know what CSS to change to style just this message.
I also have the same issue with the PayPal plugin; I get bumped to a redirect page saying 'now sending you to paypal, or click this button' but I can't for the life of me figure out how to style that message in CSS.
Please Log in or Create an account to join the conversation.
5 years 10 months ago #325504
by nicolas
Replied by nicolas on topic Skip "thankyou for your order" for free products, and / or style message
Hi,
The thank you message is displayed by the file end.php of the view "checkout". You can edit it via the menu Display>Views.
There, you'll see this code:
which displays the standard thank you message.
So you can edit the code there.
If you want to redirect the customer to the order page, then you could do a redirect on $this->url.
For example:
Regarding the CSS, you could directly add HTML tags with CSS inline or classes of your own in there as you need.
Regarding the PayPal redirection area, it's displayed by the file plugins/hikashoppayment/paypal/paypal_end.php^
If you look at that file, you can see this code:
So with CSS, you can just use the classes already available to customize the look.
For example, you could add such CSS to change the color of the text to red:
#hikashop_paypal_end_message{ color: red !important; }
www.hikashop.com/support/documentation/1...ize-the-display.html
The thank you message is displayed by the file end.php of the view "checkout". You can edit it via the menu Display>Views.
There, you'll see this code:
Code:
echo JText::_('THANK_YOU_FOR_PURCHASE');
if(!empty($this->url))
echo '<br/>'.JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE', $this->url);
So you can edit the code there.
If you want to redirect the customer to the order page, then you could do a redirect on $this->url.
For example:
Code:
$app = JFactory::getApplication();
$app->redirect($this->url);
Regarding the PayPal redirection area, it's displayed by the file plugins/hikashoppayment/paypal/paypal_end.php^
If you look at that file, you can see this code:
Code:
<span id="hikashop_paypal_end_message" class="hikashop_paypal_end_message">
<?php echo JText::sprintf('PLEASE_WAIT_BEFORE_REDIRECTION_TO_X', $this->payment_name).'<br/><span id="hikashop_paypal_button_message">'. JText::_('CLICK_ON_BUTTON_IF_NOT_REDIRECTED').'</span>';?>
</span>
For example, you could add such CSS to change the color of the text to red:
#hikashop_paypal_end_message{ color: red !important; }
www.hikashop.com/support/documentation/1...ize-the-display.html
Please Log in or Create an account to join the conversation.
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
- Posts: 32
- Thank you received: 1
5 years 10 months ago - 5 years 10 months ago #325872
by jeffmcbiscuit
Replied by jeffmcbiscuit on topic Skip "thankyou for your order" for free products, and / or style message
Hi Nicolas. Only just getting round to having a look at this.
[strike]Is there a way to view these pages without having to complete a transaction? I'd like to work on them without having to incur paypal fees![/strike]
All sorted now, thanks man.
[strike]Is there a way to view these pages without having to complete a transaction? I'd like to work on them without having to incur paypal fees![/strike]
All sorted now, thanks man.
Last edit: 5 years 10 months ago by jeffmcbiscuit.
Please Log in or Create an account to join the conversation.
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
- Posts: 32
- Thank you received: 1
5 years 9 months ago - 5 years 9 months ago #327276
by jeffmcbiscuit
Replied by jeffmcbiscuit on topic Skip "thankyou for your order" for free products, and / or style message
Hi Nicolas, sorry to necro this but I don't think I actually sorted this in the end. Regarding the redirect you suggested, where do I need to add that code? I know the page but I don't know where it goes in the code.
Just to confirm, my desire here is to skip the page with this message on completely and go from completing the purchase to the orders screen
Just to confirm, my desire here is to skip the page with this message on completely and go from completing the purchase to the orders screen
Last edit: 5 years 9 months ago by jeffmcbiscuit.
Please Log in or Create an account to join the conversation.
5 years 9 months ago #327293
by nicolas
Replied by nicolas on topic Skip "thankyou for your order" for free products, and / or style message
Hi,
You could just replace the first piece of code I gave with the second piece of code I gave.
You could just replace the first piece of code I gave with the second piece of code I gave.
Please Log in or Create an account to join the conversation.
- jeffmcbiscuit
-
Topic Author
- Offline
Less
More
- Posts: 32
- Thank you received: 1
5 years 9 months ago #327321
by jeffmcbiscuit
Replied by jeffmcbiscuit on topic Skip "thankyou for your order" for free products, and / or style message
Ah great, thanks man. I was sure I'd done that before but I must have reversed it somehow
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds