X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Drop down to select shipping carrier for tracking (https://forum.x-cart.com/showthread.php?t=9288)

inksticks 09-09-2004 07:59 AM

Drop down to select shipping carrier for tracking
 
I have an idea that I don't think would be to hard to implement but I don't quite have the skills to do it. When I log into the admin and enter a tracking number for an order that has been completed x-cart assumes that I used a certain method to ship. i.e. if the customer selected UPS Ground and I enter a tracking number when I click on track it I will be forward to the UPS site. However, if for some reason I had to ship that order via USPS the track it button will not work but x-cart still thinks I used UPS. Also if I use a customer shipping method x-cart doesn't know which carrier I used and doesn't not provide a track it button.

This is the change I will like to implement. Below the tracking number box in the /main/history_order.tpl I would like to add a drop down menu that would allow me to select which carrier I used. i.e. UPS, Fedex, USPS

Then based on the carrier I selected x-cart would decide which shipping module template to use.

I believe this could all be done by just editing 1 file /main/history_order.tpl

Under this code in the history_order.tpl the drop down menu could be added. By the way the drop down menu should not be visible to the customer.

Code:

{$lng.lbl_tracking_number}:

<INPUT type="text" name="tracking" value="{$order.tracking}"{if $usertype eq 'C'} readonly{/if}>
{if $usertype eq "A"}


Then the drop down menu could be assigned by editing this code near the bottom of the same tpl
Code:

{/if}
{assign var="postal_service" value=$order.shipping|truncate:3:"":true}
{if $active_modules.Order_Tracking ne ""}
{if $postal_service eq "UPS"}
{include file="modules/Order_Tracking/ups.tpl"}
{elseif $postal_service eq "USP"}
{include file="modules/Order_Tracking/usps.tpl"}
{elseif $postal_service eq "Fed"}
{include file="modules/Order_Tracking/fedex.tpl"}
{/if}


I believe the modules could be left how they are but $postal_service could be assigned to the drop down box rather than the $order.shipping

I may have missed some things that need to be changed but hopefully this will help someone with more expertise than me to write a good mod.

I do want to get this taken care of soon if someone has a moment. :)

inksticks 09-14-2004 07:58 AM

Shipping selections mod
 
I've posted a mod that will do this.

http://forum.x-cart.com/viewtopic.php?p=58416

Have fun! :D


All times are GMT -8. The time now is 10:36 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.