Solved

PHP code - HTML questions

Posted on 2013-11-20
5
579 Views
Last Modified: 2013-11-20
Not sure if anyone can help me, but i have a web developer who left our company recently.  He had developed a web store / ordering system that would produce sales order and then via a ODBC connection we would extract our orders from the web to our business application.

I have a process in the system by which you can select a item, and add it to the cart, the item has:
Item Code   xxxxxx
Weight 6
Quanity 1

in checking to see how much the freight is on the order we use the Customer Header info to check to see how much shipping is to ship that item or items, using the customer zip code, order weight, and country.

Well I have removed all the weight off the item that I like to give free shipping to but if you order just 1 item and it is to get free shipping the system SOMEWHERE has a default value for any shipment.
I found in one of the PHP programs a value for Minimum and set it to '0.00', expecting to see that because the order weight is 0lb it would not calculate freight,  this failed and the default value changed  I then found in our shipping table a handling fee, fuel rate and ofther fee's.  I changed all those to 0,and still the system is finding a value some where for calculation of our shipping cost.

Well after this lengthy review, I have been able to trace it back using the URL program...but I cannot find the program associated to the URL.
So when i see the URL   xxx.xxxxxxxx.com/calculate-shipping,

I am not sure how this is converted, is there a main program which controls the urls so that they are hidedn?

I see PHP files that are close to the same name but not exactly.

Question 1 can i identify the correct program using the URL?
Question 2 also if there are session variable being used how can i display their contents?

Again, this m ay not be anything someone can answer without reviewing the actual data?
0
Comment
Question by:Scott Johnston
  • 2
  • 2
5 Comments
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 400 total points
ID: 39664364
Unfortunately there could be a hundred different ways of calulating the shipping and a URL does not always relate to a single file - a URL could relate to a Controller in an MVC set up, or be re-written using an htaccess file.

Without seeing your app, it's going to be very difficult to guess.
0
 

Author Comment

by:Scott Johnston
ID: 39664395
I completely understand.  I got it traced back to coding I do not understand, yet?
I am working on it, but since I had someone else develop and the documentation is por, I am having a problem following the code...
Need a expert...
Thanks
0
 

Author Comment

by:Scott Johnston
ID: 39664435
$html .= "<ul class=\"sided\"><li><a href=\"/calculate-shipping\" style=\"font-size:0.9em;\" ".
            "title=\"Go to calculate shipping and handling\">Get shipping cost</a></li>";

this code represents a refereence and I cannot find....standard code?
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 100 total points
ID: 39664500
Probably somewhere in the code the shipping is being set to a default value if no value exists or the value is 0
As Chris said we can only guess
Is there a page or a folder called calculate-shipping? Attach that here
0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39664516
calculate-shipping could be any number of things - it doesn't necessarily represent a physical file.

It could be a module, a controller, a function, it could be re-written to a completely different file, it may just be an anchor for javascript to hook into.

Unfortunately, it's impossible to tell from seeing a small snippet of HTML. These things don't work in isolation - they're all a part of the whole project.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now