PDA

View Full Version : Shipping/Tracking Question



joanstead
02-16-2006, 07:18 AM
Is there a way to disable the tracking link that is in the customer account info for each order they make? I don't use fedex tracking. Is there a way to manually insert a new shipping carrier for tracking, like usps?

JoAn

met00
02-18-2006, 12:01 AM
Joanstead,

This is the third or fourth message that I have answered regarding stuff that you can find easily enough just by reading the PHP. Before I answer it, it took me about 10 seconds to find the file and locate the code below.

/templates/<templatename>/content/account_history_info.tpl.php


// fedex tracking
$order_id = $HTTP_GET_VARS['order_id'];
$trackLink = tep_track_fedex($order_id);
?>
<td class="main" align="right">
<?
if ($trackLink) {
echo '<a href="' . $trackLink . '"><b>track this shipment</b></a>';
}
else {
echo tep_draw_separator('pixel_trans.gif', '10', '1');
}
?>
</td>
</tr>


change to:


// fedex tracking
$order_id = $HTTP_GET_VARS['order_id'];
// $trackLink = tep_track_fedex($order_id);
?>
<td class="main" align="right">
<?
if ($trackLink) {
echo '<a href="' . $trackLink . '"><b>track this shipment</b></a>';
}
else {
echo tep_draw_separator('pixel_trans.gif', '10', '1');
}
?>
</td>
</tr>

and the track link goes away

If you want to create tracking to different shippers, just go to /includes/functions/general.php and copy the tep_track_fedex function and modify it so that it creates a link to the shipper you want. If you use multiple shipper create a generic tep_track_customer_shipment function that checks to see what shipper was used and uses a case statement to build the right type of link.

Now, a 10 second rant. It's great that there are forums to ask questions in, and since I'm using oscMAX as the base for BIAoscMAX (our overloaded version) I am more than willing to answer questions on this forum as part of my giving back to the community. but there is a difference between asking a few questions and expecting free programming help. Like I said, to answer the "disable" question took
1) look at the URL
2) look at the template for that URL
3) find the back button call
4) Viola! there was the code for the fedex insert.

10 seconds to locate, another 2 to comment it out. It took more time for you to post the query than to solve the problem.

joanstead
02-18-2006, 06:20 AM
sorry, but I'm not very experienced. I don't even know how to comment out something without having to look that up...so really, it would take me longer than you think to do what you said because I haven't went to school on this stuff. If there was a book that had everything in it, not just the basics stuff, that would help me out a lot, as I am very capable of reading and studying, when given the facts. It's just frustrating when these so-called user manuals don't have everything that you need in them. Then you have to ask in the forum, or pay a coder...so I thank you for answering my questions, but unfortunately that doesn't mean that it will be easy for me to do what you said.

met00
02-19-2006, 10:19 AM
sorry, but I'm not very experienced. I don't even know how to comment out something without having to look that up...so really, it would take me longer than you think to do what you said because I haven't went to school on this stuff. If there was a book that had everything in it, not just the basics stuff, that would help me out a lot, as I am very capable of reading and studying, when given the facts. It's just frustrating when these so-called user manuals don't have everything that you need in them. Then you have to ask in the forum, or pay a coder...so I thank you for answering my questions, but unfortunately that doesn't mean that it will be easy for me to do what you said.

I’m not trying to be harsh. Not to get into a meta discussion,

<meta discussion>

but coming on a forum to request help is like dropping in the local watering hole for mechanics and asking for help. We all don’t mind giving a ‘lil bit of advise to the novice and inexperienced. But…

Now, let’s take that metaphor and expand on it a little.

You’re asking basic HTML and basic PHP questions (as my above answer illustrates).. This would be like my wife, who is a great hairstylist, going in and asking the mechanics how to fill the tires with air and add window washer fluid. At first the mechanics would tell her how to do it, but by the time that she reached the fourth or fifth question, they would start to get a bit irritated.

At this point one of them would say, “read your owners manual.”

But you see, from your posts to date complaining about the lack of documentation, I can see that you have struggled to try to do that. But, you are looking for documentation on how to do the timing in a Ferrari when you should start out with something more basic since you have just indicated that just looking at the PHP and HTML is hard for you.

In terms of applications, oscMAX is an overbuilt sports car like a Ferrari and you want to start working on it without having ever even played around with a Volkswagen Beetle.

Now, there are a large number of mechanics that will be more than happy to help you tinker with your Ferrari and they will charge you to do so. Or, you can start with the basics and learn how to work around the Ferrari by tinkering around with less complex things like a Beetle and as you gain experience move on to the Ferrari. Right now it’s like you have a 1959 Ferrari 250 GT and want to change the oil. I have told you that you have to open the hood and look for a small metal cap for the oil, and you have walked around to the front of the car and are wondering who stole the engine.

Now, to bring this full circle – Based on your questions and responses, you don’t understand HTML and PHP basics (you have a problem with oil, water, tires and window washer fluid). This has nothing to do with oscMAX (although oscMAX is built on both). Before you start messing around with the timing and compression ratios of your new Ferrari you should really learn the basics (and actually add to that some information about mysql and the difference between procedural code, like the code in MOST of osc and OO the code in the classes). If you can’t take the time to learn the basics, then I would suggest hiring a mechanic. [Disclaimer: I have no interest in taking a job from you! My plate is full with my current client load and backlog (3 active stores and 3 stores to go live in the next 45 days)]

I would suggest that you may want to do a google search for “OSC Freelancer”. Anyone who has worked on MS2.2 and understands the BTS system should be more than able to provide you with support. If google doesn’t work for you, try getafreelancer.com [Disclaimer: I have no interest in this web site or any of the potential people that will bid for your work. We did hire a guy from Romania to take a CRE loaded template and translate it to MAX and he did a good job.]

The goal of the forums is to allow all of those of us who do mechanical work to help one another. The reason I have started to post is that BIAoscMAX (our next store release) is a version of oacMAX that we have put on steroids. Since we have started usig oscMAX as the base, I will now give back to the community by releasing mods here (rather than OSC) and responding to forum request here.

Your questions have indicated that you really need basic level support (HTML, PHP and mysql) and while anyone with no knowledge can put up a functional store with oscMAX, it does take basic knowledge to make changes and modify the store, and advanced knowledge to make some of the more advanced mods or to create your own mods that will plug into how you actually operate. In cases like yours, where you seem to be lacking the minimal basic skills required to modify the store to meet your needs, I really do suggest that you hire a freelancer rather than try to use the forums to get your education. At the same time I would suggest purchasing a book on PHP programming (there are a number out there, O’Reilly is very good for technical stuff <standard disclaimer applies> and if you feel a need to understand HOW web applications are built and designed and language is not an issue, my book (The CGI Developers Resource: Web Programming in TCL and Perl) [Disclaimer: I do make money from the sale of this book] is still out there and it attempts to teach basic programming skills that are required for writing code (note: it does so in 2 languages that you won’t need, but the principles are the same no matter what language the logic is expressed in).

</meta discussion)

joanstead
02-19-2006, 11:02 AM
I understand html. I have made many websites with html. My online store was based on html before I changed to oscmax. I'm just having trouble transitioning to php. Do you know of a good book that will help me to understand php and mysql? I already have a book on css and that was pretty easy for me to grasp. I need something that will teach me the "whole picture" of what php is all about and how the oscmax shopping cart is structured to use this format. Thanks for your constructive criticism, if you have a book(s) that can really help me, without being a waste of my money, please let me know!
JoAn,

met00
02-19-2006, 01:31 PM
The "bible" is Programming PHP by Lerdorf and Tatroe (O'Reilly). Then a nice reference for database/PHP is PHP and MYSQL Development (Sams) after that there are so many that unless they get trulyy panned, almost any is acceptable.

NONE of these will truly explain HOW to work in oscMAX, but once you have these under your belt, then you can see HOW oscMAX was written and be able to START to know how to debug it.

To really understand HOW osc works you have to build an application (mod) for it. Then you will learn how the structure works. After that you'll be answering questions on here and not asking them :-)