Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] individual product shipping prices


Recommended Posts

OK folks need a tad bit of help here

I installed the v3.0 of this contribution and I'm getting this:

 

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/hsphere/local/home/annasatt/annasattic.us/admin/categories.php on line 297

 

 

here is the line:

. tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");

 

Can anybody see what is wrong?

I've looked and looked till I'm crossed eyes.

Link to comment
Share on other sites

I would like to do this because everything a customer orders will all be sent in the same package to them. By charging the customer full price for shipping for each different product that they order, then they are paying us too much for shipping to them.

 

Do you know of any possible way to make the contribution do as I described in my previous post?

 

I had a similar request from a client and came up with the following.

 

You need to change includes\classes\shipping.php module

 

Insert only the code delimited by the // BB Start and // BB End, the other code should serve to indicate where in the file you need to add this - around about line 84(ish):

 

//phpmom.com// find shiptotoal and indvcount(# of products with indv shipping//

function get_shiptotal() {

global $cart;

$this->shiptotal = '';

$products = $cart->get_products();

 

// BB Start - Set first shipping price = second shipping price for all prods other than first prod with max shipping price - Start by determining index of max shipping price

$maxship = '0';

$i_maxship = 0;

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if (($products[$i]['products_ship_price']) > $maxship) {

$maxship = ($products[$i]['products_ship_price']);

$i_maxship = $i;

}

}

// Here we set all ship prices to second ship price for entries other than the index determined above

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if ($i != $i_maxship) {

$products[$i]['products_ship_price'] = $products[$i]['products_ship_price_two'];

}

}

 

 

// BB End - Set first shipping price

 

 

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

// mod indvship//modified hadir

// if ($products[$i]['products_ship_price']) {

$products_ship_price = $products[$i]['products_ship_price'];//}

$products_ship_price_two = $products[$i]['products_ship_price_two'];

$products_ship_zip = $products[$i]['products_ship_zip'];

Link to comment
Share on other sites

Could somebody please email me a copy of the correct page for application_top.php for v4.1

[email protected]

Pretty Please

About to lose my mind

my store is gone

all i get is

Parse error: parse error, unexpected $ in /var/hsphere/local/home/annasatt/annasattic.us/includes/application_top.php on line 515

:'(

 

Download a editor like jedit and install the php checker that should help you find where you have the error if you cannot see it for yourself.

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

OK think I have solved the parse error

but now I'm getting this:

1146 - Table 'AnnasAt_MyStore.TABLE_SHIPPING_METHODS' doesn't exist

It does in my database under products_shipping

 

select methods_id, methods_name from TABLE_SHIPPING_METHODS

[TEP STOP]

 

I have done all the steps

and checked forum

and rechecked db and made sure it is in

includes/databaes_tables.php

 

Anybody have any ideals?

Link to comment
Share on other sites

OK think I have solved the parse error

but now I'm getting this:

1146 - Table 'AnnasAt_MyStore.TABLE_SHIPPING_METHODS' doesn't exist

It does in my database under products_shipping

 

select methods_id, methods_name from TABLE_SHIPPING_METHODS

[TEP STOP]

 

I have done all the steps

and checked forum

and rechecked db and made sure it is in

includes/databaes_tables.php

 

Anybody have any ideals?

 

You didn't run the sql or it is not defined in database_tables.php (make sure the spelling is correct).

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Hai

 

I Installed this contrib with out any problem. I needs to give particular shipping rate for particular catagory of products. So in product adding page I added the values for

 

Indv. Shipping Price:

Each Additional Price:

 

I am also using the "MultiGeoZone MultiTable Shipping" which is also working fine.

 

Now the problem is,

 

In the checkout page(checkout_confirmation.php) shipping cost is not showing. It is just showing the product price.

 

In checkout_shipping.php shipping method is also not showing.

 

This happens only when I select the product with Indv. Shipping Price.

 

Any body can help on this

 

Thanks

Link to comment
Share on other sites

I am also using the "MultiGeoZone MultiTable Shipping"  which is also working fine.

 

I run the same shipping option with this. It should work fine with it when installed correctly.

-----------------------------------------------------------------------------

 

I've noticed that people keep having problems caused by the same things, so here are some guidelines for you and everyone else as this a fairly complicated contrib to install it seems.

 

GENERAL FIXES FOR PROBLEMS WITH INDIVIDUAL SHIP CONTRIB:

1) BACKUP BACKUP BACKUP

2) Read ALL the directions

3) Follow the steps

4) If problems arise think about what might be the problem, a missing bracket here, and missed step line there, accidently overwriting the wrong line...

5) Repeat steps 2, 3, & 4 and carefully look over your code.

6) If you are still having problems read the forum & post questions.

 

99% of all of these questions and problems people are having can be solved by just taking your time, and going over the code. This is not the easiest of contribs to install so you can't be careless and expect it to work. Myself and others are happy to answer questions but PLEASE DOUBLE CHECK YOUR WORK AND THE INSTRUCTIONS FIRST.

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

OK

Have redone this again

and

shipping_methods is in database and is defined in

includes/database_tables.php

But I'm still getting

1146 - Table 'AnnasAt_MyStore.TABLE_SHIPPING_METHODS' doesn't exist

 

select methods_id, methods_name from TABLE_SHIPPING_METHODS

 

Any other suggestions?

TIA

Link to comment
Share on other sites

Have a few questions regarding this contribution?

 

I have 5 catagories - CD albums, CD singles, vinyl, DVDs and tshirts

 

Each catagory of products needs to have different set postage costs but also any additional items from the same catagory be cheaper price

 

eg. CD albums = 1.50 + 1.00 for additional items

CD Singles = 1.00 + 50p for additional items

etc......

 

If possible i also need prices to be different if sent outside UK

I would have thought this would be possible and simple to do as i feel it is quite a required aspect of an online shop and have seen this throughout all online shops.

Please any help would greatly be appreciated

Link to comment
Share on other sites

please help me.. I am trying out your contribution everything is fine but i ran into the same problem in the admin tool saying that the table shipping methods..not found as people written above.

 

I use the code you provide to create table.. in my SQL database,

but i got this error message now

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'table shipping methods' at line 1

 

select methods_id, methods_name from table shipping methods

 

[TEP STOP]

 

 

please help me .. my email is [email protected]

 

thank you so much

 

Sorry I haven't been to this thread in a few day.

Ok I will try to anwser each Q

 

1-TABLE_SHIPPING_METHODS

That step in Admin>Categories does not need to be there I am sorry. That was my other Multi shipping project I started. You can delete that part totally (hold on don't do it yet)

//Product shipping

$ship_method_array = array(array('id' => '', 'text' => TEXT_NONE));

$ship_method_query = tep_db_query("select methods_id, methods_name from " . TABLE_SHIPPING_METHODS);

while ($ship_method = tep_db_fetch_array($ship_method_query)) {

$ship_method_array[] = array('id' => $ship_method['methods_id'], 'text' => $ship_method['methods_name']);

}

//end Product shipping

 

But I cannot guarantee you will not get other errors as those values might be called somewhere else. You can add the table TABLE_SHIPPING_METHODS

CREATE TABLE `shipping_methods` (
?`methods_id` int(10) unsigned NOT NULL auto_increment,
?`methods_name` varchar(32) NOT NULL default '',
?`methods_module` varchar(32) NOT NULL default '',
?`methods_handling_charge` decimal(5,2) NOT NULL default '0.00',
?`methods_handling_per_box` tinyint(1) NOT NULL default '0',
?`methods_tare_weight` decimal(4,2) NOT NULL default '0.00',
?`methods_max_box_weight` tinyint(3) unsigned NOT NULL default '0',
?`date_added` datetime default NULL,
?`last_modified` datetime default NULL,
?`ship_zipcode` varchar(32) NOT NULL default '',
?PRIMARY KEY ?(`methods_id`)
) TYPE=MyISAM AUTO_INCREMENT=14;

 

and define it in the database files. I guess you can leave it blank or add you methods like so

INSERT INTO `shipping_methods` VALUES (1, 'Fedex', 'fedex1', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (2, 'Flat Rate', 'flat', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (3, 'Free Shipping', 'freeshipper', 0.00, 0, 0.00, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (4, 'Individual Shipping', 'indvship', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (5, 'Per Item', 'item', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (6, 'Percent', 'percent', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (7, 'Table Rates', 'table', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (8, 'UPS', 'ups', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (9, 'UPSXML', 'upsxml', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (10, 'USPS', 'usps', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (11, 'Zone Based', 'zones', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (12, 'Zonesworld', 'zonesworld', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');
INSERT INTO `shipping_methods` VALUES (13, 'Regions', 'regions', 0.00, 0, 0.00, 50, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');

 

If you do decide to delete that part of code check for other error that appear because of removing it. Please post here so I can fix instructrions

Thanks

Link to comment
Share on other sites

Hello,

 

I am trying to set this contrib up for my web site. I have it all set up, but I am using it for something specific. I only have a few products that are oversized, hence the reason I am using Indiv Ship. If a customer purchases an item that is oversized I want the flat rate to show up. However, if the customer also purchases something smaller in the same purchase as well, I want to use the calculated amount of the smaller item and then add the indiv ship amount for the larger item. Is there a way to acomplish this?

 

Thanks,

 

JT

Link to comment
Share on other sites

Having a problem with the second shipping price. Everything works fine unless I put "0" as the additonal (second) shipping charge. Then the shipping seems to be calculated by multiplying the first shipping amount by the number of products.

 

Originally I had this set up so it worked perfectly, but then I must have bumped something accidentally while customizing my shop. I tried re-working everything, but nothing seems to fix it.

 

Can anyone give me a hand with this? I'm going insane!

Link to comment
Share on other sites

Hi all, I've had this running for awhile now but I'm running into a problem with my free shipping per product mod and this mod. Each one works fine on its own but when a customer adds one indv ship product and one free ship product in the cart at the same time the free ship does not display. Instead I get the rest of the shipping methods. Does anyone have any ideas on this.

 

Here is my checkout_shipping.php

 

<?php
/*
 $Id: checkout_shipping.php,v 1.16 2003/06/09 23:03:53 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require('includes/classes/http_client.php');

// BOF: Individual Shipping 
if (tep_get_configuration_key_value('MODULE_SHIPPING_INDVSHIP_STATUS') and $shiptotal) {
 tep_session_unregister('shipping');
}
// EOF: Individual Shipping 

// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

// if there is nothing in the customers cart, redirect them to the shopping cart page
 if ($cart->count_contents() < 1) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

// if no shipping destination address was selected, use the customers own address as default
 if (!tep_session_is_registered('sendto')) {
   tep_session_register('sendto');
   $sendto = $customer_default_address_id;
 } else {
// verify the selected shipping address
   $check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
   $check_address = tep_db_fetch_array($check_address_query);

   if ($check_address['total'] != '1') {
     $sendto = $customer_default_address_id;
     if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
   }
 }

 require(DIR_WS_CLASSES . 'order.php');
 $order = new order;

// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
 if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
 $cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
   if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
   $shipping = false;
   $sendto = false;
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();

// load all enabled shipping modules
 

 if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
   $pass = false;

   switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
     case 'national':
       if ($order->delivery['country_id'] == STORE_COUNTRY) {
         $pass = true;
       }
       break;
     case 'international':
       if ($order->delivery['country_id'] != STORE_COUNTRY) {
         $pass = true;
       }
       break;
     case 'both':
       $pass = true;
       break;
   }

   $free_shipping = false;
   if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
     $free_shipping = true;

     include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
   }
 } else {
   $free_shipping = false;
 }

if ($free_shipping == false) {
 $check_free_shipping_basket_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
 while ($check_free_shipping_basket = tep_db_fetch_array($check_free_shipping_basket_query)) {
   $check_free_shipping_query = tep_db_query("select products_free_shipping from " . TABLE_PRODUCTS . " where products_id = '" . (int)$check_free_shipping_basket['products_id'] . "'");
$check_free_shipping = tep_db_fetch_array($check_free_shipping_query);
$check_free_shipping_array[] = $check_free_shipping['products_free_shipping'];
 }
 if (in_array("1", $check_free_shipping_array) && !in_array("0", $check_free_shipping_array)) {
   $free_shipping = true;
   include_once(DIR_WS_LANGUAGES . $language . '/checkout_shipping.php');
 }
}

if ($order->delivery['country_id'] != STORE_COUNTRY && FREE_SHIPPING_TO_ALL_COUNTRIES == "true") {
 $free_shipping = false;
}

// process the selected shipping method
 if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
   if (!tep_session_is_registered('comments')) tep_session_register('comments');
   if (tep_not_null($HTTP_POST_VARS['comments'])) {
     $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
   }

   if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

   if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
     if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
       $shipping = $HTTP_POST_VARS['shipping'];

       list($module, $method) = explode('_', $shipping);
       if ( is_object($$module) || ($shipping == 'free_free') ) {
         if ($shipping == 'free_free') {
           $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
           $quote[0]['methods'][0]['cost'] = '0';
         } else {
           $quote = $shipping_modules->quote($method, $module);
         }
         if (isset($quote['error'])) {
           tep_session_unregister('shipping');
         } else {
           if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
             $shipping = array('id' => $shipping,
                               'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
                               'cost' => $quote[0]['methods'][0]['cost']);

             tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
           }
         }
       } else {
         tep_session_unregister('shipping');
       }
     }
   } else {
     $shipping = false;
               
     tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
   }    
 }

// get all available shipping quotes
 $quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

 $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
var selected;

function selectRowEffect(object, buttonSelect) {
 if (!selected) {
   if (document.getElementById) {
     selected = document.getElementById('defaultSelected');
   } else {
     selected = document.all['defaultSelected'];
   }
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_address.shipping[0]) {
   document.checkout_address.shipping[buttonSelect].checked=true;
 } else {
   document.checkout_address.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table align="center" bgcolor="#FFFFFF" border="0" width="760px" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
               <td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
               <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
                   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if (tep_count_shipping_modules() > 0) {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
   if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
               <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
   } elseif ($free_shipping == false) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
<?php
   }

   if ($free_shipping == true) {
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b> <?php echo $quotes[$i]['icon']; ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
                 <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
             </tr>
    
<?php
   } else {
     $radio_buttons = 0;
     for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
if(($quotes[$i]['id']== 'indvship')&&(sizeof($quotes) > 1 && sizeof($quotes[0]) > 1)){ //hadir//phpmom.com
echo '<tr><td width="100%" colSpan="2" class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2">You have '.$shipping_modules->get_indvcount().' product with individual shipping total of '.$shipping_modules->get_shiptotal().'. Please leave the in store pickup box checked or you may upgrade your shipping by choosing below. This total will be ADDED to the shipping method selected.</td>
</tr>';}
    else{ //hadir//phpmom.com
?>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
	 
     <?php
       if (isset($quotes[$i]['error'])) {
?>
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
       } else {
         for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
           $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

           if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
             echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
           } else {
             echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
           }
?>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
           if ( ($n > 1) || ($n2 > 1) ) {
?>
                   <td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
                   <td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
           } else {
?>
                   <td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
           }
?>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
<?php
           $radio_buttons++;
         }
       }
 }
?>
               </table></td>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 
             </tr>
<?php
     }
   }
?>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
               <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
             </tr>
           </table></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
           <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
               <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
             </tr>
    
           </table></td>
         </tr>
         <tr>
           <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
           <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
         </tr>
       </table></td>
     </tr>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks in advance.

Link to comment
Share on other sites

Please help

 

I have set it up and uploaded everything, but when I go to check out I get this:

 

Fatal error: Call to undefined function: get_shiptotal() in /homepages/46/d98455693/htdocs/shop/catalog/includes/modules/shipping/indvship.php on line 51

 

Any ideas

 

Did you ever get a response to this problem? I have the exact same problem and I don't think it has anything to do with the indvship.php file.

Link to comment
Share on other sites

I have looked through this entire contribution and I cant find an answer to this error message:

 

Fatal error: Call to undefined function: get_shiptotal() in /home/palapajo/public_html/store/catalog/includes/modules/shipping/indvship.php on line 53

 

Which file would be causing this error?

 

Any help would be greatly appreciated!

 

-Lary

Link to comment
Share on other sites

these should be in classes/shipping

    function get_shiptotal() {
     global $cart;
$this->shiptotal = '';
$products = $cart->get_products();
   for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       // mod indvship//modified hadir
//        if ($products[$i]['products_ship_price']) {
$products_ship_price = $products[$i]['products_ship_price'];//}
$products_ship_price_two = $products[$i]['products_ship_price_two'];
$products_ship_zip = $products[$i]['products_ship_zip'];
$qty = $products[$i]['quantity'];
if(($products_ship_price) ||($products_ship_price_two)){
  $this->shiptotal += ($products_ship_price);
    if ($qty > 1) {
     if ($products_ship_price_two) {
    $this->shiptotal += ($products_ship_price_two * ($qty-1));
    } else {
     $this->shiptotal += ($products_ship_price * ($qty-1));
    }
} }
 } // first mod ok  $this->shiptotal += ($products_ship_price * $qty);
       // mod indvship//modified hadir
  // first mod ok  $this->shiptotal += ($products_ship_price * $qty);
  // end indvship
  return $this->shiptotal;
   }
   function get_indvcount() {
     global $cart;
$this->indvcount = '';
$products = $cart->get_products();
   for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       // mod indvship//modified hadir
//        if ($products[$i]['products_ship_price']) {
$products_ship_price = $products[$i]['products_ship_price'];//}
$products_ship_price_two = $products[$i]['products_ship_price_two'];
if(is_numeric($products_ship_price)){
  $this->indvcount += '1';
}
 } // first mod ok  $this->shiptotal += ($products_ship_price * $qty);
       // mod indvship//modified hadir
  // first mod ok  $this->shiptotal += ($products_ship_price * $qty);
  // end indvship
  return $this->indvcount;
   }

 

at the end before the } or above function cheapest

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Link to comment
Share on other sites

bump- Anybody have a clue? I have it working now except for the fact that the free shipping will not show on its own. Only when in the cart with a non-free shipping item.

 

assign indv shipping of '0' instead of using the freeshipping if it does not work for you

q_|_|| _|9~~J >-o>-o q_|_|| )| q_|| )

Link to comment
Share on other sites

Is there a way of setting it up so if a postage cost is the same then the next product postage at that rate is reduced. because my products in certain categories have the same postage cost and want the reduced rate to include any other products in that category not just the same product.

 

also anyway of having three zone increases rather then Uk and rest of world. Have UK, Europe and rest of world??

 

thank you

Edited by idlerob
Link to comment
Share on other sites

Host installed version 4.2 for me and

When I go to checkout from testing site I get this error

Fatal error: Call to undefined function: get_shiptotal() in /var/hsphere/local/home/annasatt/annasattic.us/catalog/includes/modules/shipping/indvship.php on line 53

I notice others have same problem.

I have searched checkout_shipping page and find no get_shiptotal in the code.

Dose anybody have the coding for that page?

Link to comment
Share on other sites

sorry what I meant does anybody know what is wrong with this $shiptotal = $shipping_modules->get_shiptotal(); from shipping/indvship.php

here is the code

function quote($method = '') {

global $order, $cart, $shipping_modules;

$shiptotal = $shipping_modules->get_shiptotal();

if ($shiptotal){

$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_INDVSHIP_TEXT_TITLE,

'methods' => array(array('id' => $this->code,

'title' => MODULE_SHIPPING_INDVSHIP_TEXT_WAY,

'cost' => $shiptotal)));

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...