- Posts: 21
- Thank you received: 2
Customer Order History & Tracking Numbers
12 years 6 months ago - 12 years 6 months ago #148724
by Scott
Customer Order History & Tracking Numbers was created by Scott
-- url of the page with the problem -- :
-- HikaShop version -- : 2.3.0
-- Joomla version --
.2
-- PHP version -- : 5.4
Is there a way to add tracking information in the customers order history so they can log in and access their tracking number?
Thanks
-- HikaShop version -- : 2.3.0
-- Joomla version --
.2-- PHP version -- : 5.4
Is there a way to add tracking information in the customers order history so they can log in and access their tracking number?
Thanks
Last edit: 12 years 6 months ago by Scott. Reason: Figured part of it out
Please Log in or Create an account to join the conversation.
12 years 6 months ago #148738
by nicolas
Replied by nicolas on topic Customer Order History & Tracking Numbers
Hi,
You can create a custom field of the table "order" via the menu Display>Custom fields.
That way you'll be able to edit it in the order details page in the backend.
Then, you can edit the file "show" of the view "order" via the menu Display>Views and add such code in order to display what you entered in the custom field:
<?php echo $this->element->FIELD_NAME; ?>
where FIELD_NAME is the column name of your custom order field.
You can create a custom field of the table "order" via the menu Display>Custom fields.
That way you'll be able to edit it in the order details page in the backend.
Then, you can edit the file "show" of the view "order" via the menu Display>Views and add such code in order to display what you entered in the custom field:
<?php echo $this->element->FIELD_NAME; ?>
where FIELD_NAME is the column name of your custom order field.
The following user(s) said Thank You: Scott
Please Log in or Create an account to join the conversation.
12 years 6 months ago #148860
by Scott
Replied by Scott on topic Customer Order History & Tracking Numbers
Thank you.
If I wanted to add 2 custom fields, how would I code that? For example, if I wanted to add a tracking number and the date of shipping I enter the code:
<?php echo $this->element->shipping_date; ?>
<?php echo $this->element->tracking_number; ?>
But they both appear on the same line. Is there a way to insert a link break so they appear of different lines?
If I wanted to add 2 custom fields, how would I code that? For example, if I wanted to add a tracking number and the date of shipping I enter the code:
<?php echo $this->element->shipping_date; ?>
<?php echo $this->element->tracking_number; ?>
But they both appear on the same line. Is there a way to insert a link break so they appear of different lines?
Please Log in or Create an account to join the conversation.
12 years 6 months ago #148865
by Scott
Replied by Scott on topic Customer Order History & Tracking Numbers
Solved it. For anyone interested, if you want text to appear before the information such as:
Shipped On: (your entry)
Tracking Number: (your entry)
Insert the following code on line 501 of Displays > View > Orders > Show:
<?php echo JText::_('Shipped on').' : '.$this->element->shippingdate; ?><br/>
<?php echo JText::_('Tracking Number').' : '.$this->element->tracking_number; ?>
Shipped On: (your entry)
Tracking Number: (your entry)
Insert the following code on line 501 of Displays > View > Orders > Show:
<?php echo JText::_('Shipped on').' : '.$this->element->shippingdate; ?><br/>
<?php echo JText::_('Tracking Number').' : '.$this->element->tracking_number; ?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.197 seconds