Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

oldschoo

Pioneers
  • Posts

    163
  • Joined

  • Last visited

Everything posted by oldschoo

  1. This page might help. Different file.php but same concept http://www.parse-error-unexpected-t-string.com/
  2. How do I add the words "quantity" or "# in stock" before the actual quantity. Right now just shows the quantity count with no wording in front of it.
  3. We finally got it working. Will post finished code soon.
  4. I have 2 different questions: 1) I have order disclaimer installed on my site - order disclaimer. How do I get that to show on one page checkout? 2) Has anyone got this to work with this Authorize Net AIM module (GPL) add on authorize aim gpl to work with one page checkout? If anyone has, please provide details.
  5. It sounds like you are missing some files. Make sure you have: admin/includes/modules/newsletters directory - and the three different newsletters (newsletter.php, newsletter_products.php, product_notifications.php) admin/includes/languages/english/newsletter directory and the different newsletters
  6. I am trying to get this to work with products newsletter and products notifications. Does anyone have the code change in admin/includes/modules/newsletters/product_notifications.php and admin/includes/modules/newsletters/newsletter_products.php product_notifications.php original code $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); $mimemessage->add_text($this->content); $mimemessage->build_message(); reset($audience); while (list($key, $value) = each ($audience)) { $mimemessage->send($value['firstname'] . ' ' . $value['lastname'], $value['email_address'], '', EMAIL_FROM, $this->title); } newsletter_products.php original code $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId)); //$mimemessage->add_text($this->content); //$text = $this->text_content(); $mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } Thanks for any help you can give.
  7. I have the contribution newsletter unsubscribe. How can I use the unsubscribe link from that add on with this add on? That contribution say to change the following in admin/includes/modules/newsletters/newsletter.php from this code $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); $mimemessage->add_text($this->content); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } to this code // Begin Unsubscribe hack $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>'); $mimemessage->build_message(); $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } // End Unsubscribe hack I am assuming I change this code in admin/includes/mdules/newsletters/newssletter_products $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId)); //$mimemessage->add_text($this->content); //$text = $this->text_content(); $mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } Any help would be greatly appreciated.
  8. John Im not sure if this will work or not. You can try changing define('DIR_WS_TEMPLATES', DIR_FS_ADMIN . 'templates/'); to define('DIR_WS_TEMPLATES', DIR_FS_ADMIN . 'spice/admin/templates/'); You can try with and without the public_html I am pretty sure your problem in the admin/includes/configure.php file. In that same file has a place for define('DIR_WS_ADMIN', '/path to admin/'); define('DIR_FS_ADMIN', '/server/username/public_html/path to admin/'); These will help you determine what should be put in define('DIR_WS_TEMPLATES', DIR_FS_ADMIN . 'templates/'); You can also try deleting the templats folder in admin and re uploading it with your template. Make sure the file name is a small "t" and not "Templates" If you can view page source, that may give you some more information, or your error report from you cpanel.
  9. I have almost got this working, thanks to steve_s for all his help. I am stuck on the includes/classes/shipping.php file. I show the four levels in admin, products, the four different shipping prices are stored in the database, so the admin part is working correctly. I need the shipping charges to be: 1st item: $ x.xx (charge for first item) 2nd item: $ x.xx (charge for second item) 3rd item: $ x.xx (charge for third item) 4th item: $x.xx (charge for the fourth item and beyond) So, If someone purchased 5 items, they would pay: 1st item ship + 2nd item ship + 3rd item ship + 4th item ship + 4th item ship. This is the part I am having problems with: //start indvship function get_shiptotal() { global $cart, $order; $this->shiptotal = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($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_price_three = $products[$i]['products_ship_price_three']; $products_ship_price_four = $products[$i]['products_ship_price_four']; $products_ship_zip = $products[$i]['products_ship_zip']; $qty = $products[$i]['quantity']; if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){ $this->shiptotal += ($products_ship_price); if ($qty > 1) { if (tep_not_null($products_ship_price_two)) { $this->shiptotal += ($products_ship_price_two * ($qty-1)); } else { if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_three)){ $this->shiptotal += ($products_ship_price); if ($qty > 2) { if (tep_not_null($products_ship_price_three)) { $this->shiptotal += ($products_ship_price_three * ($qty-1)); } else { if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_four)){ $this->shiptotal += ($products_ship_price); if ($qty > 3) { if (tep_not_null($products_ship_price_four)) { $this->shiptotal += ($products_ship_price_four * ($qty-1)); } else { $this->shiptotal += ($products_ship_price * ($qty-1)); } }/////////////NOT HERE <<------------ } } } } } } } } [\code] The above code is figuring the shipping for each item over 1 at the 2nd item ship. Thank you for any help
  10. I just installed this contribution last month and do not have any problems. Did you upload your template to that directory? Doulbe check the install directions again, to make sure you didnt miss anything.
  11. Just an idea - When posting an updated version It would be very useful to have update instructions for those of us updating from a prior version. Example: update from version 1.6 to 1.7 do this: It is very time consuming to check over each part of the original instructions when you only need to do certain parts for the upgrade. It would save install time for everyone that already has an older version.
  12. I am having a problem with this contribution. Once in a while when I add a new product, it doesnt always add the individual shipping to the order, even though it is stored in the database. It doesnt happen all the time, and it doesnt happen in a certain category. Most of the time, 99% it works fine. Any ideas?
  13. My client wants to apply a discount to shipping only. We currently have Individual Product shipping rate contribution. That contribution sets a shipping rate per item based on quantity. For example - purchase one at $10, each additional (of same product) is $8. So, the module adds th $10 for the 1st one, PLUS the rate for each additional based on that product. My clients wants to apply a SHIPPING discount if they purchase a quantity of 4 or more. He does not want the discount to be applied to the product, subtotal or tax, JUST SHIPPING. Can this contribution do that? And if so, PLEASE provide example of how I would do that. And also which php file would I put it in?
  14. If you are talking about background, text size and font, border, etc, those are all in catalog/stylesheet.css. Also check the oscommerce documentantion.
  15. For file: catalog/includes/classes/shopping_cart.php original code // start indvship $products_shipping_query = tep_db_query("select products_ship_price, products_ship_price_two, products_ship_zip, products_ship_methods_id from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . $products['products_id'] . "'"); $products_shipping = tep_db_fetch_array($products_shipping_query); // end indvship and changed to: // start indvship $products_shipping_query = tep_db_query("select products_ship_price, products_ship_price_two, products_ship_price_three, products_ship_price_four, products_ship_zip, products_ship_methods_id from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . $products['products_id'] . "'"); $products_shipping = tep_db_fetch_array($products_shipping_query); // end indvship and this original ccode // start indvship 'products_ship_price' => $products_shipping['products_ship_price'], 'products_ship_price_two' => $products_shipping['products_ship_price_two'], 'products_ship_zip' => $products_shipping['products_ship_zip'], // end indvship [/code] and changed to: // start indvship 'products_ship_price' => $products_shipping['products_ship_price'], 'products_ship_price_two' => $products_shipping['products_ship_price_two'], 'products_ship_price_three' => $products_shipping['products_ship_price_three'], 'products_ship_price_four' => $products_shipping['products_ship_price_four'], 'products_ship_zip' => $products_shipping['products_ship_zip'], // end indvship How do these changes look?
  16. For catalog/admin/categories original code // start indvship $sql_shipping_array = array('products_ship_zip' => tep_db_prepare_input($_POST['products_ship_zip']), 'products_ship_methods_id' => tep_db_prepare_input($_POST['products_ship_methods_id']), 'products_ship_price' => round(tep_db_prepare_input($_POST['products_ship_price']),4), 'products_ship_price_two' => round(tep_db_prepare_input($_POST['products_ship_price_two']),4)); $sql_shipping_id_array = array('products_id' => (int)$products_id); $products_ship_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id = " . (int)$products_id); if(tep_db_num_rows($products_ship_query) >0) { if (($_POST['products_ship_zip'] == '')&&($_POST['products_ship_methods_id'] == '')&&($_POST['products_ship_price'] == '')&&($_POST['products_ship_price_two'] == '')){ tep_db_query("DELETE FROM " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$products_id . "'"); } else { tep_db_perform(TABLE_PRODUCTS_SHIPPING, $sql_shipping_array, 'update', "products_id = '" . (int)$products_id . "'"); } } else { if (($_POST['products_ship_zip'] != '')||($_POST['products_ship_methods_id'] != '')||($_POST['products_ship_price'] != '')||($_POST['products_ship_price_two'] != '')){ $sql_ship_array = array_merge($sql_shipping_array, $sql_shipping_id_array); tep_db_perform(TABLE_PRODUCTS_SHIPPING, $sql_ship_array, 'insert'); } } // end indvship changed to this: // start indvship $sql_shipping_array = array('products_ship_zip' => tep_db_prepare_input($_POST['products_ship_zip']), 'products_ship_methods_id' => tep_db_prepare_input($_POST['products_ship_methods_id']), 'products_ship_price' => round(tep_db_prepare_input($_POST['products_ship_price']),4), 'products_ship_price_two' => round(tep_db_prepare_input($_POST['products_ship_price_two']),4), 'products_ship_price_three' => round(tep_db_prepare_input($_POST['products_ship_price_three']),4), 'products_ship_price_four' => round(tep_db_prepare_input($_POST['products_ship_price_four']),4)); $sql_shipping_id_array = array('products_id' => (int)$products_id); $products_ship_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id = " . (int)$products_id); if(tep_db_num_rows($products_ship_query) >0) { if (($_POST['products_ship_zip'] == '')&&($_POST['products_ship_methods_id'] == '')&&($_POST['products_ship_price'] == '')&&($_POST['products_ship_price_two'] == '')&&($_POST['products_ship_price_three'] == '')&&($_POST['products_ship_price_four'] == '')){ tep_db_query("DELETE FROM " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$products_id . "'"); } else { tep_db_perform(TABLE_PRODUCTS_SHIPPING, $sql_shipping_array, 'update', "products_id = '" . (int)$products_id . "'"); } } else { if (($_POST['products_ship_zip'] != '')||($_POST['products_ship_methods_id'] != '')||($_POST['products_ship_price'] != '')||($_POST['products_ship_price_two'] != '')||($_POST['products_ship_price_three'] != '')||($_POST['products_ship_price_four'] != '')){ $sql_ship_array = array_merge($sql_shipping_array, $sql_shipping_id_array); tep_db_perform(TABLE_PRODUCTS_SHIPPING, $sql_ship_array, 'insert'); } } // end indvship and then this part - original // start indvship $products_shipping_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id=" . (int)$_GET['pID']); while ($products_shipping = tep_db_fetch_array($products_shipping_query)) { $products_ship_zip = $products_shipping['products_ship_zip']; $products_ship_methods_id = $products_shipping['products_ship_methods_id']; $products_ship_price = $products_shipping['products_ship_price']; $products_ship_price_two = $products_shipping['products_ship_price_two']; } $shipping=array('products_ship_methods_id' => $products_ship_methods_id, 'products_ship_zip' => $products_ship_zip, 'products_ship_price' => $products_ship_price, 'products_ship_price_two' => $products_ship_price_two); $pInfo->objectInfo($shipping); // end indvship and changed to this // start indvship $products_shipping_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id=" . (int)$_GET['pID']); while ($products_shipping = tep_db_fetch_array($products_shipping_query)) { $products_ship_zip = $products_shipping['products_ship_zip']; $products_ship_methods_id = $products_shipping['products_ship_methods_id']; $products_ship_price = $products_shipping['products_ship_price']; $products_ship_price_two = $products_shipping['products_ship_price_two']; $products_ship_price_three = $products_shipping['products_ship_price_three']; $products_ship_price_four = $products_shipping['products_ship_price_four']; } $shipping=array('products_ship_methods_id' => $products_ship_methods_id, 'products_ship_zip' => $products_ship_zip, 'products_ship_price' => $products_ship_price, 'products_ship_price_two' => $products_ship_price_two, 'products_ship_price_three' => $products_ship_price_three, 'products_ship_price_four' => $products_ship_price_four); $pInfo->objectInfo($shipping); // end indvship and then this part - original <?php // start indvship ?> <!-- Zipcode --> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_ZIPCODE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_zip', $pInfo->products_ship_zip); if(tep_not_null($pInfo->products_ship_zip)) echo 'notnull'; else echo 'null'; ?></td> </tr> <!-- end Zipcode --> <!-- Indvship --> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Indv. Shipping Price:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price', $pInfo->products_ship_price); if(tep_not_null($pInfo->products_ship_price)) echo 'notnull'; else echo 'null'; ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Each Additional Price:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_two', $pInfo->products_ship_price_two); if(tep_not_null($pInfo->products_ship_price_two)) echo 'notnull'; else echo 'null'; ?></td> </tr> <!-- end Indvship --> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php // end indvship ?> and changed to this <?php // start indvship ?> <!-- Zipcode --> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_ZIPCODE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_zip', $pInfo->products_ship_zip); if(tep_not_null($pInfo->products_ship_zip)) echo 'notnull'; else echo 'null'; ?></td> </tr> <!-- end Zipcode --> <!-- Indvship --> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Indv. Shipping Price 1:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price', $pInfo->products_ship_price); if(tep_not_null($pInfo->products_ship_price)) echo 'notnull'; else echo 'null'; ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Indv. Shipping Price 2:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_two', $pInfo->products_ship_price_two); if(tep_not_null($pInfo->products_ship_price_two)) echo 'notnull'; else echo 'null'; ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Indv. Shipping Price 3:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_three', $pInfo->products_ship_price_three); if(tep_not_null($pInfo->products_ship_price_three)) echo 'notnull'; else echo 'null'; ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo 'Each Additional Price:'; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_ship_price_four', $pInfo->products_ship_price_four); if(tep_not_null($pInfo->products_ship_price_four)) echo 'notnull'; else echo 'null'; ?></td> </tr> <!-- end Indvship --> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php // end indvship ?> and then this original code // start indvship $products_shipping_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id=" . (int)$_GET['pID']); while ($products_shipping = tep_db_fetch_array($products_shipping_query)) { $products_ship_methods_id = $products_shipping['products_ship_methods_id']; $products_ship_zip = $products_shipping['products_ship_zip']; $products_ship_price = $products_shipping['products_ship_price']; $products_ship_price_two = $products_shipping['products_ship_price_two']; } $shipping=array('products_ship_methods_id' => $products_ship_methods_id, 'products_ship_zip' => $products_ship_zip, 'products_ship_price' => $products_ship_price, 'products_ship_price_two' => $products_ship_price_two); $pInfo->objectInfo($shipping); // end indvship and chaned to this: // start indvship $products_shipping_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_SHIPPING . " WHERE products_id=" . (int)$_GET['pID']); while ($products_shipping = tep_db_fetch_array($products_shipping_query)) { $products_ship_methods_id = $products_shipping['products_ship_methods_id']; $products_ship_zip = $products_shipping['products_ship_zip']; $products_ship_price = $products_shipping['products_ship_price']; $products_ship_price_two = $products_shipping['products_ship_price_two']; $products_ship_price_three = $products_shipping['products_ship_price_three']; $products_ship_price_four = $products_shipping['products_ship_price_four']; } $shipping=array('products_ship_methods_id' => $products_ship_methods_id, 'products_ship_zip' => $products_ship_zip, 'products_ship_price' => $products_ship_price, 'products_ship_price_two' => $products_ship_price_two, 'products_ship_price_three' => $products_ship_price_three, 'products_ship_price_four' => $products_ship_price_four); $pInfo->objectInfo($shipping); // end indvship How do these chanes look?
  17. Now in this file: catalog/product_info.php I can't figure out this part of the code: original code // start indvship $extra_shipping_query = tep_db_query("select products_ship_price, products_ship_price_two from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$products_id . "'"); if (tep_db_num_rows($extra_shipping_query)) { $extra_shipping = tep_db_fetch_array($extra_shipping_query); if($extra_shipping['products_ship_price'] == '0.00'){ echo '<i>(Free Shipping for this Item)</i>'; } else { echo '<i>(This item requires additional shipping of $' . $extra_shipping['products_ship_price']; if (($extra_shipping['products_ship_price_two']) > 0) { echo ' for the first item, and $' . $extra_shipping['products_ship_price_two'] . ' for each additional item + regular shipping costs.)</i>'; } else { echo ' + regular shipping costs.)</i>'; } } } // end indvship What I have figured out so far: // start indvship $extra_shipping_query = tep_db_query("select products_ship_price, products_ship_price_two, products_ship_price_three, products_ship_price_four from " . TABLE_PRODUCTS_SHIPPING . " where products_id = '" . (int)$products_id . "'"); if (tep_db_num_rows($extra_shipping_query)) { $extra_shipping = tep_db_fetch_array($extra_shipping_query); if($extra_shipping['products_ship_price'] == '0.00'){ echo '<i>(Free Shipping for this Item)</i>'; } else { echo '<i>(This item requires additional shipping of $' . $extra_shipping['products_ship_price']; if (($extra_shipping['products_ship_price_two']) > 0) { echo ' for the first item, and $' . $extra_shipping['products_ship_price_two'] . ' for each additional item + regular shipping costs.)</i>'; } else { echo ' + regular shipping costs.)</i>'; } } } // end indvship Thank you to anyone that can help!
  18. I am trying to modify the Individual Product Shipping Rate to allow four different levels of Individual Product Shipping Rates. I Think the files I need to change are: catalog/admin/categories.php catalog/includes/classes/shipping.php catalog/includes/classes/shopping_cart.php catalog/product_info.php and update the database to include product_ship_price_three and product_ship_price_four I am working on catalog/includes/classes/shipping.php This part of the code I need help with please: original code //start indvship function get_shiptotal() { global $cart, $order; $this->shiptotal = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($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(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){ $this->shiptotal += ($products_ship_price); if ($qty > 1) { if (tep_not_null($products_ship_price_two)) { $this->shiptotal += ($products_ship_price_two * ($qty-1)); } else { $this->shiptotal += ($products_ship_price * ($qty-1)); } }/////////////NOT HERE <<------------ } } }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN/////////////move back here <<------------ if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) { if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') { $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE; } else { $this->shiptotal += INDIVIDUAL_SHIP_INCREASE * $this->get_indvcount(); } return $this->shiptotal; // not sure why this is needed, but it now works correctly for home country - by Ed } else { $this->shiptotal *= 1; return $this->shiptotal; } } function get_indvcount() { global $cart; $this->indvcount = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($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'; } } } return $this->indvcount; } // end indvship I have modified this muchc so far: //start indvship function get_shiptotal() { global $cart, $order; $this->shiptotal = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($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_price_three = $products[$i]['products_ship_price_three']; $products_ship_price_four = $products[$i]['products_ship_price_four']; $products_ship_zip = $products[$i]['products_ship_zip']; $qty = $products[$i]['quantity']; if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two) ||tep_not_null($products_ship_price_three)||tep_not_null($products_ship_price_four)){ $this->shiptotal += ($products_ship_price); if ($qty = 2) { if (tep_not_null($products_ship_price_two)) { $this->shiptotal += ($products_ship_price_two); } elseif ($qty = 3) { if (tep_not_null($products_ship_price_three)) { $this->shiptotal += ($products_ship_price_two) += ($products_ship_price_three); } elseif ($qty > 3) { if (tep_not_null($products_ship_price_four)) { $this->shiptotal += ($products_ship_price_two) += ($products_ship_price_three) += ($products_ship_price_four * ($qty-1)); } else { $this->shiptotal += ($products_ship_price * ($qty-1)); } }/////////////NOT HERE <<------------ } } }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN/////////////move back here <<------------ if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) { if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') { $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE; } else { $this->shiptotal += INDIVIDUAL_SHIP_INCREASE * $this->get_indvcount(); } return $this->shiptotal; // not sure why this is needed, but it now works correctly for home country - by Ed } else { $this->shiptotal *= 1; return $this->shiptotal; } } function get_indvcount() { global $cart; $this->indvcount = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($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_price_three = $products[$i]['products_ship_price_three']; $products_ship_price_four = $products[$i]['products_ship_price_four']; if(is_numeric($products_ship_price)){ $this->indvcount += '1'; } } } return $this->indvcount; } // end indvship Does this look correct? I have a live shop and don't want to screw up a working shop.
  19. Check the contributioins section, and do a search for shipping. You might even try searching for each seperate shipping company. I dont know of one contribution that does them all.
  20. I need some help with code changes. I am trying to add 2 more individual shipping prices, so it works like this: ship price xxx for first item ship price two xxx for 2nd item ship price three xxx for 3rd item ship price four xxx for each additional item. Can this be done? or is there already a contribution that does that?
  21. I am installing version 3.0.1 and have a question. In the install directions, there is no instrutions on what to do in the admin/includes/functions/html_output.php file, but the file is in the attached files. Are there changes to be done to this admin/includes/functions/html_output.php file? I have already modified that file with other contritbutions, so please, I need to the exact install instructions for that file, if any.
×
×
  • Create New...