Tracking Number Custom Field not working
11 years 5 months ago #199166
by Urbinati
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Tracking Number Custom Field not working was created by Urbinati
-- url of the page with the problem -- :
www.dreamlordpress.it
-- HikaShop version -- : 2-4-0
-- Joomla version -- : 3.4.1
Hi,
I created a custom field "Tracking Number" with column name "tracking_number", in the order table.
1) Added code
to the order view but it doesn't show up.
2) Added code:
to the order status notification but all the line doesn't show up.
It seams nothing I add to the HTML version of the mail do actually show up.
Thanks in advance,
Nicola.
-- HikaShop version -- : 2-4-0
-- Joomla version -- : 3.4.1
Hi,
I created a custom field "Tracking Number" with column name "tracking_number", in the order table.
1) Added code
Code:
<?php echo $this->element->tracking_number; ?>
2) Added code:
Code:
<?php
if($data->mail_status == 'shipped'){
?><span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">Tracciamento Spedizione: </span> <?php echo $this->element->tracking_number;
}
?>
It seams nothing I add to the HTML version of the mail do actually show up.
Thanks in advance,
Nicola.
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199193
by nicolas
Replied by nicolas on topic Tracking Number Custom Field not working
Hi,
1. To which order view did you add that code exactly ? And where do you want to have the tracking code displayed exactly ?
2. In the order status notification, the "shipped" status is in the variable $data->order_status and the tracking code is in the variable:
$data->cart->tracking_number
1. To which order view did you add that code exactly ? And where do you want to have the tracking code displayed exactly ?
2. In the order status notification, the "shipped" status is in the variable $data->order_status and the tracking code is in the variable:
$data->cart->tracking_number
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199275
by Urbinati
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Replied by Urbinati on topic Tracking Number Custom Field not working
Hi nicolas,
Thank you for the insigtht, but it still doesn't work.
Here's the code from the order status notification mail:
I added the "if($data->order_status == 'shipped'){..." part, but it doesn't show when I open the mail popup in the order view in the administrazion panel, or the popup mail view when I change order status from order list in administration.
No Tracking Number, just "Tracciamento Spedizione" in the actual mail sent (the copy I receive as administrator).
In the front order view (order->view view, the one you open fron your user account to see a single order):
Here I added a line in the additional informations table. It shows "Numero di Tracciamento Raccomandata", AND the tracking number value.
So Everything works but the tracking number value in the notification mail.
Thanks!
Thank you for the insigtht, but it still doesn't work.
Here's the code from the order status notification mail:
Code:
<!--{IF:SHIPPING}-->
<p>
<span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:HIKASHOP_SHIPPING_METHOD} :</span> {VAR:SHIPPING} {VAR:order.shipping_tracking}
<?php
if($data->order_status == 'shipped'){
?><span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">Tracciamento Spedizione: </span> <?php echo $data->cart->tracking_number;
}
?>
</p>
<!--{ENDIF:SHIPPING}-->
I added the "if($data->order_status == 'shipped'){..." part, but it doesn't show when I open the mail popup in the order view in the administrazion panel, or the popup mail view when I change order status from order list in administration.
No Tracking Number, just "Tracciamento Spedizione" in the actual mail sent (the copy I receive as administrator).
In the front order view (order->view view, the one you open fron your user account to see a single order):
Code:
<fieldset class="hikashop_order_custom_fields_fieldset">
<legend><?php echo JText::_('ADDITIONAL_INFORMATION'); ?></legend>
<table class="hikashop_order_custom_fields_table adminlist" cellpadding="1" width="100%">
<tr class="hikashop_order_custom_field_<?php echo $fieldName;?>_line">
<td class="key">
Numero di Tracciamento :
</td>
<td>
<?php echo $this->element->tracking_number; ?>
</td>
</tr>
<?php foreach($this->fields['order'] as $fieldName => $oneExtraField) {
if(!@$oneExtraField->field_frontcomp || empty($this->order->$fieldName)) continue;
?>
<tr class="hikashop_order_custom_field_<?php echo $fieldName;?>_line">
<td class="key">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</td>
<td>
<?php echo $this->fieldsClass->show($oneExtraField,$this->order->$fieldName); ?>
</td>
</tr>
<tr class="hikashop_order_custom_field_<?php echo $fieldName;?>_line">
<td class="key">
Numero di Tracciamento Raccomandata :
</td>
<td>
<?php echo $data->cart->tracking_number; ?>
</td>
</tr>
<?php } ?>
</table>
</fieldset>
Here I added a line in the additional informations table. It shows "Numero di Tracciamento Raccomandata", AND the tracking number value.
So Everything works but the tracking number value in the notification mail.
Thanks!
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
11 years 5 months ago #199288
by Mohamed Thelji
Replied by Mohamed Thelji on topic Tracking Number Custom Field not working
Hello,
Regarding the tracking number value in the notification mail, the solution can firstly be to directly test and display the value of your tracking number custom field to know if it's correctly saved through the "$data->cart" variable.
Regarding the tracking number value in the notification mail, the solution can firstly be to directly test and display the value of your tracking number custom field to know if it's correctly saved through the "$data->cart" variable.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202166
by Urbinati
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Replied by Urbinati on topic Tracking Number Custom Field not working
Hi,
Finally solved the problem, thank you all!
Finally solved the problem, thank you all!
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Please Log in or Create an account to join the conversation.
Time to create page: 0.214 seconds