Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quantity Price Chart Display on Front-end


Guest

Recommended Posts

I'm trying to display a price discount chart on the frontend. best I've gotten are zeros... Any help is appreciated. Thanks.

 

 

if ($sppc_customer_group_id == '2') {

     $attributes_query = tep_db_query("select customers_group_id, customers_group_price, products_price1, products_price2, products_price3, products_price4, products_price5, products_price6, products_price7, products_price8, products_price1_qty, products_price2_qty, products_price3_qty, products_price4_qty, products_price5_qty, products_price6_qty, products_price7_qty, products_price8_qty, products_qty_blocks from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pInfo->products_id . "' and customers_group_id = '" . $customers_group['customers_group_id'] . "' order by customers_group_id");

$product = tep_db_fetch_array($attributes_query);

// echo '------> '. $scustomer_group_price['customers_group_price'];

?>



<tr><td>
<table class="pricechart" border="1" cellspacing="0" cellpadding="3" style="width: 125px; height: 200px">
   <tbody>
       <tr>
           <td colspan="2" style="vertical-align: top">
           <p>Quantity Discounts</p>
           </td>
       </tr>
       <tr>
           <td style="background-color: rgb(255,102,0); width: 15px"><span style="color: white">Quantity</span></td>
           <td style="background-color: rgb(204,0,0); color: white">Price</td>
       </tr>
       <tr>
           <td><?php echo $pInfo->products_price ?></td>
           <td><?php echo  $pInfo->products_price; ?></td>
       </tr>
       <tr>
           <td><?php 
if (tep_not_null($pInfo->products_price2)) {
           echo $pInfo->products_price2;
           }
           ?>
           </td>
           <td><?php 
if (tep_not_null($product['products_price2'])) {
           echo  $product['products_price2']; 
           }

           ?></td>
       </tr>
    <tr>
           <td><?php 
if (tep_not_null($product_info['products_price3_qty'])) {
           echo $product_info['products_price3_qty']; 
           }
           ?></td>
           <td><?php 
if (tep_not_null($products_price3)) {
           echo $product_info['products_price3']; 
           }

           ?></td>
       </tr>
    <tr>
           <td><?php 
if (tep_not_null($product_info['products_price4_qty'])) {
           echo $product_info['products_price4_qty']; 
           }
           ?></td>
           <td><?php 
if (tep_not_null($product_info['products_price4'])) {
           echo $product_info['products_price4']; 
           }

           ?></td>
       </tr>
    <tr>
           <td><?php 
if (tep_not_null($product_info['products_price5'])) {
           echo $product_info['products_price5_qty']; 
           }
           ?></td>
           <td><?php 
if (tep_not_null($product_info['products_price5'])) {
           echo $product_info['products_price5']; 
           }

           ?></td>
       </tr>
    <tr>
           <td><?php 
if (tep_not_null($product_info['products_price6'])) {
           echo $product_info['products_price6_qty']; 
           }
           ?></td>
           <td><?php 
if (tep_not_null($product_info['products_price6'])) {
           echo $product_info['products_price6']; 
           }

           ?></td>
       </tr>
    <tr>
           <td><?php 
if (tep_not_null($products_price7_qty)) {
           echo $attributes['products_price7_qty']; 
           }
           ?></td>
           <td><?php 
if (tep_not_null($products_price7)) {
           echo $attributes['products_price7']; 
           }

           ?></td>
       </tr>
   </tbody>
</table>
</td></tr>


<?php
}
?>

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...