Tooltips end up in emails after checkout

  • Posts: 42
  • Thank you received: 0
7 years 3 months ago #274904

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 7
-- PHP version -- : 7
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : none

Hi,
made some tooltips on custom fields using the nonumber extension. This is easy and working very well.
However, these tooltips are now displayed in all emails that are sent.
Have the business edition and can change email settings, but have no idea what I should add or do ...?
Hope you can help!
Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 3 months ago #274909

Hello,

Without more details about where are the tooltips exactly it will be very difficult to give you a precise answer.

But by definition, thanks to HikaShop Business you can edit and customize your emails ; so you can change how the custom fields are displayed in yours emails yes.
But you can also do the opposite and only add the tooltips in the front-end using view overrides.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 42
  • Thank you received: 0
7 years 3 months ago #274974

I will try to explain better and include two screenshots.

Have added tooltips on custom items with the tooltip nonumber extensions. This means in the Label of each custom item, I do not write the label only, but also the tooltip, for example:
instead of only: Base (cm)
I have:
{tip content="Indicare la base della stampa in cm"}Base (cm){/tip}

I can disable this whole field in emails, but it is very important to have this field included as it is fundamental for understanding what a customer orders.

As you can see from the screenshots however, the whole text in the Label field is taken and not only 'Base (cm)'.

My question is: how can I exclude the tooltip part from the emails and also the shopping cart (at first the shopping cart shows the tooltips as tooltips, but when modifying the cart it shows simply the whole text ({tip content="Indicare la base della stampa in cm"}Base (cm){/tip}) instead of the 'Base (cm) with a tooltip.

In the email part I have seen this field, but I do not know how to modify this:
{TXT:CUSTOMFIELD_NAME}

of further down:
$cartProduct = '';
if(!empty($fields) && hikashop_level(1)){
foreach($fields as $field){
$namekey = $field->field_namekey;
$productData = @$productClass->all_products[$item->product_id];
$cartProduct .= '<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">'.(empty($productData->$namekey)?'':$fieldsClass->show($field,$productData->$namekey)).'</td>';
}
}

In case this is complicated, do you have a different way of making tooltips for the custom items?

Thanks!


Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 3 months ago #274978

But by definition, thanks to HikaShop Business you can edit and customize your emails ; so you can change how the custom fields are displayed in yours emails yes.
But you can also do the opposite and only add the tooltips in the front-end using view overrides.


You definitively want to not put the tooltip tag in the custom field names.
You need to customize the front-end view to add the tooltip where/when they are displayed.

www.hikashop.com/support/documentation/1...ize-the-display.html
www.hikashop.com/support/documentation/5...g.html#advanced_main

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 42
  • Thank you received: 0
7 years 3 months ago #275019

Hi Jerome,
thanks for your answer. Unfortunately, it is not clear how I should do this from the links you have provided.

By the way, I had read on the forum that I should use the number extension and put it in the label.
See here:
www.hikashop.com/support/forum/2-general...r-custom-fields.html

I would appreciate if you could help a bit with the exact code I should put in the front-end override (that part of how to make an override is very well explained!) to show a tooltip on custom fields. Hope this is not too complicated?

Thanks!

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
7 years 3 months ago #275116

Hi,

You can change the line:

$t .= '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey,'admin_email').'</p>';
in the preload of the emails.
Please understand that custom coding is not part of the normal support.
You should normally contact a 3rd party developer to help you with that.
I guess that something like that should do:
$t .= '<p>'.preg_replace('/{(.*?)}/', '', $fieldsClass->getFieldName($field)).': '.$fieldsClass->show($field,$item->$namekey,'admin_email').'</p>';

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

  • Posts: 42
  • Thank you received: 0
7 years 3 months ago #275139

Thanks a lot, this is working perfectly.
I really appreciate the help!!
Hope it will be useful also for others who use custom fields and tooltips.
Thanks!

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

Time to create page: 0.073 seconds
Powered by Kunena Forum