Solved

PHP code - HTML questions

Posted on 2013-11-20
5
575 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 42

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 42

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

743 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

9 Experts available now in Live!

Get 1:1 Help Now