Jump to content
GetSirius

Free Shipping Per Product for v2.3

Recommended Posts

On 4/19/2017 at 7:57 AM, Tsimi said:

and use this following manual to install it into the osC BS Edge version.

install_osC_BS_Edge.txt

I did not improve the addon at all I just simply updated the install manual and that's it.

Tsimi

FIRST and foremost THANK YOU for the installation instructions for OSC Bootstrap.  They were RIGHT ON.  Have used this particular mod for years in an OSC 2.3.4 store and really did NOT want to change.  The old saying "IF it ain't broke  DON'T fix it" applies.

HOWEVER, there is one spot that does not exist in the BS Frozen version (All the rest matched up perfectly)

That instruction set is this code


***********************************************
catalog/product_info.php  NOT AVAIL 
***********************************************
Find:

<div class="page-header">
  <div class="row">  
    <h1 class="col-sm-8"><?php echo $products_name; ?></h1>
    <h2 class="col-sm-4 text-right-not-xs" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?php echo $products_price; ?></h2>
  </div>
</div>
	
Replace with:

<?php
// PRODUCTS SHIP FREE START
	if(tep_products_ship_free_check($product_info['products_id']))
	      $freeship_str .= '<br /><span class="smallText">(' . TEXT_PRODUCT_SHIPS_FREE . ')</span>';	
?>
<div class="page-header">
  <div class="row">  
    <h1 class="col-sm-8"><?php echo $products_name; ?></h1>
    <h2 class="col-sm-4 text-right-not-xs" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?php echo $products_price . $freeship_str; ?></h2>
  </div>
</div>
<!-- PRODUCTS SHIP FREE END //-->

The FROZEN version of the file reads like this

<?php
/*
  $Id$

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

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  if (!isset($_GET['products_id'])) {
    tep_redirect(tep_href_link('index.php'));
  }

  require('includes/languages/' . $language . '/product_info.php');

  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

  require('includes/template_top.php');

  if ($product_check['total'] < 1) {
?>

<div class="contentContainer">

  <div class="row">
    <?php echo $oscTemplate->getContent('product_info_not_found'); ?>
  </div>
  
</div>

<?php
  } else {
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info = tep_db_fetch_array($product_info_query);

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

?>

<?php echo tep_draw_form('cart_quantity', tep_href_link('product_info.php', tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>

<div class="contentContainer">

  <div class="row is-product">
    <?php echo $oscTemplate->getContent('product_info'); ?>
  </div>

</div>

</form>

<?php
  }
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');
?>

Not wanting to "crash" the rest of MY TEST STORE (am upgrading)  I must ask

Where does the required coding go?

Thank you in advance

BJ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×