Shipping Tracking Number on Customer Order Page

  • Posts: 35
  • Thank you received: 1
10 years 5 months ago #159080

url of the page with the problem -- : goldsmiths.accountsupport.com
-- HikaShop version -- : HikaShop Business: 2.3.0
-- Joomla version -- : 3.3.0
-- PHP version -- : 5.3.13
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : none


Hello,

I have been following the instruction is the forum on adding a shipping tracking number and have been able to kind of add it as instructed.

Although, I was wondering if there were a way to have it actually show up in the "Additional Information" section instead of below it? (see Screenshot)

Also, I was wondering if there was a way to make the tracking number a hyperlink?

Finally, what would be the best way to get this information to the customer via an email through the system?


Thank you for your time!

Sincerely,
Brandon Cardone, Card One Concepts
Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 5 months ago #159113

Hi,


1. Sure, just move the code you added in the view file inside the fieldset of the additional information area.

2. Yes. Change the code that you added to have a HTML "a" link around the number and that will do it.

3. You'll have to edit the order status notification email via System>Emails, add a similar customization there and then tick the "notify customer" checkbox when changing the status of the order to "shipped".

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

  • Posts: 35
  • Thank you received: 1
10 years 5 months ago #159240

Hello,

Thank you for your reply!

Sorry, yes I am able to place the tracking code within the "Additional Information" as you suggested.

But I am having trouble figuring out how to code the PHP so that the tracking code is a hyperlink?

Currently I have this just to display the tracking code:
<?php echo 'Tracking number:'.$this->element->shipping_tracking; ?>

I am pretty sure I am screwing up the PHP code to add a hyperlink becuase everything I try I get server errors. I am trying to add the following ups tracking number url ( wwwapps.ups.com/WebTracking/track?track=yes&trackNums=####### ). At the end of the url right after the = where you see "#######" I am trying to get the tracking code to dynamically be added to the url. And then also make the tracking numbers the clickable text.

Here is my attempt at coding it but obviously it is not working becuase I really do not know how to fully code PHP.

Tracking Number: <a href="http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums='<?php echo .$this->element->shipping_tracking; ?>'"><?php echo .$this->element->shipping_tracking; ?></a>

Could you please help me with the above code?


Also, I did try to add code to the email template, but when I go into the order section and choose to change the status from complete to shipped and the popup comes up with the email template, I can see where my code is but it does not seem to be picking up the data?

Here is my code for the email template ( shipping_tracking ) is the name of the custom field I added to the "Order" "Show" view btw.
<p style="border-bottom:1px solid #ddd;padding-bottom:10px;">
	You can track your orders shipping status here: <a href="http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums={VAR:SHIPPING_TRACKING}" target="_blank">{TXT:SHIPPING_TRACKING}</a>
</p>

Here is a screen shot of what I see in the html email popup:



Any help with this code as well would be appreciated!


Thank you for your time!

Sincerely,
Brandon Cardone, Card One Concepts
Attachments:
Last edit: 10 years 5 months ago by CardOneConcepts.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
10 years 5 months ago #159268

Hi,

You should try that code instead:

Tracking Number: <a href="http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=<?php echo $this->element->shipping_tracking; ?>"><?php echo $this->element->shipping_tracking; ?></a>

Using {VAR:SHIPPING_TRACKING} is not possible because that variable isn't defined in the preload area of the email.
Instead, you should use: {VAR:order.shipping_tracking}

The following user(s) said Thank You: CardOneConcepts

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

  • Posts: 35
  • Thank you received: 1
10 years 5 months ago #159278

Thank you! Thank You! Thank You!!!

Everything works like a charm! Thank you for your help with the code.


Thank you for your time!

Sincerely,
Brandon Cardone, Card One Concepts

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

Time to create page: 0.075 seconds
Powered by Kunena Forum