Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

creating a table to appear in shipping comments


bksbeat

Recommended Posts

I need to edit shipping.php as I would like to include a table that displays to the customer the table rates based on price that will be applied to their order. Hence, I need to write this in php and I am no expert in determining the code for this. I was wondering if their is a contribution for this or a piece of code around that one can use as a template?

 

Thanks

Gary

Link to comment
Share on other sites

Gary, just insert this into includes>languages>english>shipping.php

 

<TABLE width=40% cellpadding=2 cellspacing=0 border=1>
 <TR>
<TD>Price of Item</TD>
<TD>Cost of Shipping</TD>
 </TR>
 <TR>
<TD>0.01-9.99</TD>
<TD>3.99</TD>

 </TR>
 <TR>
<TD>10.00-19.99</TD>
<TD>6.99</TD>
 </TR>
 <TR>
<TD>20.00-29.99</TD>
<TD>9.99</TD>
 </TR>
 </TABLE>

 

Ofcourse you can edit the sample data and add as many rows as you would like and adjust the table width so it looks right on your site.

 

 

You code for Shipping.php will look something like this:

 

<?php
/*
 $Id: shipping.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Shipping & Returns');
define('HEADING_TITLE', 'Shipping & Returns');

define('TEXT_INFORMATION', ' <TABLE width=40% cellpadding=2 cellspacing=0 border=1>
 <TR>
<TD>Price of Item</TD>
<TD>Cost of Shipping</TD>
 </TR>
 <TR>
<TD>0.01-9.99</TD>
<TD>3.99</TD>

 </TR>
 <TR>
<TD>10.00-19.99</TD>
<TD>6.99</TD>
 </TR>
 <TR>
<TD>20.00-29.99</TD>
<TD>9.99</TD>
 </TR>
 </TABLE>');
?>

 

Chris

Link to comment
Share on other sites

Thank you Chris - this is great!

If you can help me with one more thing connected to this table. I will having free shipping for order over $200. I would like to have a type of banner or line of text on the home page displaying this. Is their a standard way to do this and what file is best to use?

Thanks

Gary

 

 

Gary, just insert this into includes>languages>english>shipping.php

 

<TABLE width=40% cellpadding=2 cellspacing=0 border=1>
 <TR>
<TD>Price of Item</TD>
<TD>Cost of Shipping</TD>
 </TR>
 <TR>
<TD>0.01-9.99</TD>
<TD>3.99</TD>

 </TR>
 <TR>
<TD>10.00-19.99</TD>
<TD>6.99</TD>
 </TR>
 <TR>
<TD>20.00-29.99</TD>
<TD>9.99</TD>
 </TR>
 </TABLE>

 

Ofcourse you can edit the sample data and add as many rows as you would like and adjust the table width so it looks right on your site.

 

 

You code for Shipping.php will look something like this:

 

<?php
/*
 $Id: shipping.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Shipping & Returns');
define('HEADING_TITLE', 'Shipping & Returns');

define('TEXT_INFORMATION', ' <TABLE width=40% cellpadding=2 cellspacing=0 border=1>
 <TR>
<TD>Price of Item</TD>
<TD>Cost of Shipping</TD>
 </TR>
 <TR>
<TD>0.01-9.99</TD>
<TD>3.99</TD>

 </TR>
 <TR>
<TD>10.00-19.99</TD>
<TD>6.99</TD>
 </TR>
 <TR>
<TD>20.00-29.99</TD>
<TD>9.99</TD>
 </TR>
 </TABLE>');
?>

 

Chris

Link to comment
Share on other sites

Gary, you can place a banner( make one yourself ) for the index.php page and place it in the includes>languages>english>index.php file where it says TEXT_Main. This will place it where it says "Lets see what we have here" I think is the default text. You can also add a line in the above table stating the same thing.

 

 

Chris

Link to comment
Share on other sites

If you look at my site, i.e. www/nontando.com - I am just not sure how I could put it there as I have quite a bit of text there already and dont want the "free shipping" message to be crammed in. Ideally I would like to put in that line above... ART, GIFTS...

and I did that in index.php but for some reason it did not display..

 

define('HEADING_TITLE', 'ART, GIFTS AND HOME DECOR FROM THE AFRICAN CONTINENT');

 

 

Gary, you can place a banner( make one yourself ) for the index.php page and place it in the includes>languages>english>index.php file where it says TEXT_Main. This will place it where it says "Lets see what we have here" I think is the default text. You can also add a line in the above table stating the same thing.

 

 

Chris

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...