- Posts: 12
- Thank you received: 0
How to put a space between QTY and PRICE in emails
10 years 1 month ago #248545
by seanm
How to put a space between QTY and PRICE in emails was created by seanm
-- HikaShop version -- : HikaShop Business 2.6.3 [1605112330]
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.4.45
Is there a way to put a space between the product count ordered and the cost of the product?
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.4.45
Is there a way to put a space between the product count ordered and the cost of the product?
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248557
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic How to put a space between QTY and PRICE in emails
Hi,
Regarding your screenshot, it looks like the product name is really long so it make the first column very large.
Because that first column is very large, the other columns are as thin as possible that's why there is no space between their content.
The content is just an HTML table ; by editing the email you can see to force some width but if the content in the first column is still large, it won't help much.
So I will more suggest you to modify the email to truncate the content in the first column (or add some line breaks).
www.hikashop.com/support/documentation/i...p-email-listing.html
www.hikashop.com/support/documentation/i...shop-email-form.html
( Note that the email edition is only available in HikaShop Business )
Regards,
Regarding your screenshot, it looks like the product name is really long so it make the first column very large.
Because that first column is very large, the other columns are as thin as possible that's why there is no space between their content.
The content is just an HTML table ; by editing the email you can see to force some width but if the content in the first column is still large, it won't help much.
So I will more suggest you to modify the email to truncate the content in the first column (or add some line breaks).
www.hikashop.com/support/documentation/i...p-email-listing.html
www.hikashop.com/support/documentation/i...shop-email-form.html
( Note that the email edition is only available in HikaShop Business )
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248834
by seanm
Replied by seanm on topic How to put a space between QTY and PRICE in emails
Thank you for your help. It's really useful.
Where in the order creation email code would you add few </br> to put a space between the QTY and PRICE ?
Where in the order creation email code would you add few </br> to put a space between the QTY and PRICE ?
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248837
by nicolas
Replied by nicolas on topic How to put a space between QTY and PRICE in emails
Hi,
Actually, I wouldn't add any br.
I would simply add a line of CSS to the email HTML template so that the text after the : in the products name goes to the next line.
Such CSS should do the job:
.hikashop_product_variant_subname{ display: block; }
Actually, I wouldn't add any br.
I would simply add a line of CSS to the email HTML template so that the text after the : in the products name goes to the next line.
Such CSS should do the job:
.hikashop_product_variant_subname{ display: block; }
Please Log in or Create an account to join the conversation.
10 years 1 month ago - 10 years 1 month ago #248913
by seanm
Replied by seanm on topic How to put a space between QTY and PRICE in emails
I think this is the code you are talking about. Please show me.
HTML VERSION BELOW
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
{TXT:SUMMARY_OF_YOUR_ORDER}
</h1>
<!--{START:VENDOR_LINE}-->
<!--{IF:VENDOR_CONTENT}-->{VAR:VENDOR_CONTENT}<!--{ENDIF:VENDOR_CONTENT}-->
<table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>
{TXT:CUSTOMFIELD_NAME}
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_QUANTITY} </td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"> {TXT:PRODUCT_TOTAL}</td>
</tr>
<!--{START:PRODUCT_LINE}-->
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
{LINEVAR:PRODUCT_IMG}
{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
{LINEVAR:PRODUCT_DOWNLOAD}
{LINEVAR:PRODUCT_DETAILS}
</td>
{LINEVAR:CUSTOMFIELD_VALUE}
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
</tr>
<!--{END:PRODUCT_LINE}-->
TEXT VERSION BELOW
<?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?>
<?php echo JText::_('CART_PRODUCT_NAME')."\t".JText::_('CART_PRODUCT_UNIT_PRICE')."\t".JText::_('CART_PRODUCT_QUANTITY')."\t".JText::_('HIKASHOP_TOTAL');?>
<?php
foreach($data->cart->products as $item){
$price = $item->order_product_price*$item->order_product_quantity;
echo strip_tags($item->order_product_name) . "\t" . $currencyHelper->format($item->order_product_price,$data->order_currency_id)."\t".$item->order_product_quantity."\t".$currencyHelper->format($price,$data->order_currency_id)."\n";
}
HTML VERSION BELOW
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
{TXT:SUMMARY_OF_YOUR_ORDER}
</h1>
<!--{START:VENDOR_LINE}-->
<!--{IF:VENDOR_CONTENT}-->{VAR:VENDOR_CONTENT}<!--{ENDIF:VENDOR_CONTENT}-->
<table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>
{TXT:CUSTOMFIELD_NAME}
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_QUANTITY} </td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"> {TXT:PRODUCT_TOTAL}</td>
</tr>
<!--{START:PRODUCT_LINE}-->
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
{LINEVAR:PRODUCT_IMG}
{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
{LINEVAR:PRODUCT_DOWNLOAD}
{LINEVAR:PRODUCT_DETAILS}
</td>
{LINEVAR:CUSTOMFIELD_VALUE}
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
</tr>
<!--{END:PRODUCT_LINE}-->
TEXT VERSION BELOW
<?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?>
<?php echo JText::_('CART_PRODUCT_NAME')."\t".JText::_('CART_PRODUCT_UNIT_PRICE')."\t".JText::_('CART_PRODUCT_QUANTITY')."\t".JText::_('HIKASHOP_TOTAL');?>
<?php
foreach($data->cart->products as $item){
$price = $item->order_product_price*$item->order_product_quantity;
echo strip_tags($item->order_product_name) . "\t" . $currencyHelper->format($item->order_product_price,$data->order_currency_id)."\t".$item->order_product_quantity."\t".$currencyHelper->format($price,$data->order_currency_id)."\n";
}
Last edit: 10 years 1 month ago by seanm.
Please Log in or Create an account to join the conversation.
10 years 1 month ago - 10 years 1 month ago #248915
by Philip
Replied by Philip on topic How to put a space between QTY and PRICE in emails
Hello,
You can add on your product name this Css property
.
More precisely, in your HTML version, around line 90, replace this :
For this :
Hope that will solve your issue, and we are are awaiting news from you.
Regards
You can add on your product name this Css property
Code:
white-space: normal
More precisely, in your HTML version, around line 90, replace this :
Code:
...
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>
...
Code:
...
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;white-space: normal">{TXT:PRODUCT_NAME}</td>
...
Hope that will solve your issue, and we are are awaiting news from you.
Regards
Last edit: 10 years 1 month ago by Philip.
The following user(s) said Thank You: seanm
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds