Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Hi guys, I want a page with bundled xsell products.

Everything is good so far only sometimes when updating the page, the product names of the sub-products are reversed.

here is the page. Maybe someone of you has an idea to do something better?

<?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');
  require('includes/languages/' . $language . '/xsell_bundles.php');
  $breadcrumb->add(NAVBAR_TITLE, tep_href_link('xsell_bundles.php'));
  require('includes/template_top.php');

?>

<div class="thumbnail equal-height">
<h1><div class="pls_Textmargin"><?php echo HEADING_TITLE; ?></div></h1>
<div class="panel-heading" itemprop="name">

<div class="row">
<?php echo TEXT_INFORMATION; ?>
<div class="pls_PB10"></div></div>

<?php

$product_query = tep_db_query("select pd.products_id, pd.products_name, px.products_id
                                  from products_xsell px left join products p on px.products_id = p.products_id, products_description pd
                                  where px.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_status = '1' order by pd.products_name and px.products_id ASC");

$xsell_product_query = tep_db_query("select pd.products_name as name, px.xsell_id
                                  from products_xsell px left join products p on px.xsell_id = p.products_id, products_description pd
                                  where px.xsell_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_status = '1' order by pd.products_name and px.products_id");
if (tep_db_num_rows($product_query) == 0) {
echo '<div class="pls_PB10DRK pls_BgrYel">';
echo DISCOUNT_HEADING_TITLE_FOR_INFO_GIFT_NO_PRODUCTS;
echo '</div>';
}else{
while ($top_product = tep_db_fetch_array($product_query)) {
$xsell_product = tep_db_fetch_array($xsell_product_query);
echo '<div class="sideline_red pls_PB10RED pls_BgrYel">';
echo '<div class="pls_PB5 col-sm-4">Hauptartikel:<br><a href="' . tep_href_link('product_info.php', 'products_id=' . $top_product['products_id']). '">' . $top_product['products_name'] . '</a><br><a href="' . tep_href_link('product_info.php', 'products_id=' . $top_product['products_id']) . '" class="btn btn-success btn-index btn-xs" role="button">' . SMALL_IMAGE_BUTTON_VIEW_BOXES . '</a></div>';
echo '<div class="pls_PB5 col-sm-4">Gruppenartikel:<br><a href="' . tep_href_link('product_info.php', 'products_id=' . $xsell_product['xsell_id']). '">' . $xsell_product['name'] . '</a><br><a href="' . tep_href_link('product_info.php', 'products_id=' . $xsell_product['xsell_id']) . '" class="btn btn-success btn-index btn-xs" role="button">' . SMALL_IMAGE_BUTTON_VIEW_BOXES . '</a></div>';
echo '<div class="clearfix"></div></div>';
}
}
?>

<div class="clearfix"></div><div class="pls_PB10"></div>


 <div class="contentContainer">
  <div class="buttonSet">
    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', tep_href_link('index.php')); ?></div>
    </div>
</div>
</div>
</div>

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

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...