Make Pay Now Button More Visible

  • Posts: 872
  • Thank you received: 10
  • Hikashop Essential
2 months 2 weeks ago #334094

Hi there,

The Pay Now text in the Order Creation Notification email is really small so I thought I'd style it so that it is more visible. I just want to check to see if where I styled it is the correct place to do so as I know Hikashop has a lot of moving parts and I don't want to mess anything up.

The change is made in the Order Creation Notification email > Preload version.

I changed this:

echo '<p><a href="'. $pay_url .'">'.JText::_('PAY_NOW') . '</a></p>';

To this:
echo '<p style="display:inline-block;background:#006499;border:1px solid #ddd; padding:15px; margin-top:5px; margin-bottom:5px;"><a style="color:#ffffff;font-size:16px;" href="'. $pay_url .'">'.JText::_('PAY_NOW') . '</a></p>';

Thanks!

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 2 weeks ago #334096

Hi,

That's correct. Ideally, it would be better to just add a class to the elements there, and add the class with the style in the template of the email where you already have CSS code.
But that's fine too.

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

  • Posts: 872
  • Thank you received: 10
  • Hikashop Essential
2 months 2 weeks ago #334132

Hi,

I don't have any CSS code in the template but I would much prefer to do it the way you indicated. Please confirm where I should put the CSS code.

1) Should it go in the HTML version box?

2) And if yes, should it be the first thing at the top as per example below?

<style type="text/css">
.mycss {
Styles goes here...
}
</style>

<?php
/**
* @package HikaShop for Joomla!
* @version 4.3.0
* @author hikashop.com
* @copyright (C) 2010-2020 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>

Other template code....

Thanks!

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 2 weeks ago #334146

Hi,

You could add it in the HTML version, but I'd rather recommend you add it to the template.
And yes, you can just add it at the beginning, as you said.
Here is a screenshot of what is in the "default" template of emails by default:
i.imgur.com/mCKo4q4.png
It would be strange if you don't have that too. You can see there that just after the comment at the beginning of the file, you have the CSS code area. Please double check your email template.

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

  • Posts: 872
  • Thank you received: 10
  • Hikashop Essential
2 months 1 week ago #334212

Hi,

This is odd, I don't have any CSS in my template. As a matter of fact I don't see any CSS in any of the templates, none in the ones that I customized and none in the ones that are not customized.

I even removed the "HTML customization" and "Preload Customization", from one of the one that I customized just to see if that would make it appear but there is still no CSS.

Please see my screen shot.

Thanks!

Attachments:

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

  • Posts: 73703
  • Thank you received: 11298
  • MODERATOR
2 months 1 week ago #334224

Hi,

Your screenshot is for the HTML version.
My screenshot is for the template popup.
You'll get what I'm talking about if you click on the edit icon of the "Email template" setting in the "Main information" section on your screenshot.

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

  • Posts: 872
  • Thank you received: 10
  • Hikashop Essential
2 months 1 week ago #334272

Oh I see what you mean now. Thanks :)

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

Time to create page: 0.070 seconds
Powered by Kunena Forum