Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Hi guys,

 

 

SORRY NOT ABOVE SPACE FOR MY MONSTER POSTING :(

 

... with this code inside the product_info.php buying an downloading is no problem..

 

/*
 $Id: product_info.php 2003/07/01 14:34:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
<?php

 require('includes/application_top.php');
 

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

 $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)$HTTP_GET_VARS['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);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<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="style.css">
<script language="javascript">
<!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=no,copyhistory=no,width=310,height=200,screenX=0,screenY=0,top=200,left=35
0')
}
//-->
</script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_ende //-->

<!-- body //-->

<table border="0" width="75%" cellspacing="0" cellpadding="0">



 
 


<!-- body_text //-->

   <td valign="top" class="item">
  <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
    
 <table border="0" width="75%" cellspacing="0" cellpadding="0">
   <?php
     if ($product_check['total'] < 1) {
   ?>
 
     <td class="item">
	 
    <table border="0" width="75%" cellspacing="5" cellpadding="0">
      <tr>
     <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td class="item">
	 
    <table border="0" width="75%" cellspacing="5" cellpadding="0">
      <tr>
     <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
     <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
     <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellspacing="0" cellpadding="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
<?php
 } else {
   $product_info_query = tep_db_query("select p.products_id, pd.products_name, p.products_spiel_dauer, p.products_release_datum, p.products_titel_anzahl, 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, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['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)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
     $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
     $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }

   if (tep_not_null($product_info['products_model'])) {
     $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
   } else {
     $products_name = $product_info['products_name'];
   }
?>
         <tr>
     <td valign="top" class="item">
	 
    <table border="0" width="75%" cellspacing="10" cellpadding="0" class="item">
      <tr>
     <td align="left" valign="top" class="wt_ueberschrift"><?php echo $products_name; ?></td>
     <td align="right" valign="top" class="wt_ueberschrift"><?php echo $products_price; ?></td>
   </tr>
   <tr>
     <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
   </tr>
   <tr>
     <td align="left" valign="top" class="item">
       <?php echo sprintf(TEXT_PRODUCTS_LABEL, ($product_info['manufacturers_name'])); ?><br>
  	 <?php echo sprintf(TEXT_PRODUCTS_SPIEL_DAUER, ($product_info['products_spiel_dauer'])); ?><br>
     </td>
     <td align="right" valign="top">
       <?php
      if (tep_not_null($product_info['products_image'])) {
  	 ?>
  	 
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
       <td align="right" valign="top">
         <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?>
       </td>
     </tr>
       </table>
      
  	 <?php
  	 }
  	 ?>
     </td>
   </tr>
   
    </table>
    
	 </td>
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td class="item">
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="20">
      <tr>
     <td align="left" valign="top" class="item">
       <p><?php echo stripslashes($product_info['products_description']); ?></p>
  	 <?php
      $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
      $products_attributes = tep_db_fetch_array($products_attributes_query);
      if ($products_attributes['total'] > 0) {
  	 ?>
  	 
  	 <table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top" align="left" class="item" colspan="3">
       <?php echo TEXT_PRODUCT_OPTIONS; ?>
     </td>
      </tr>
      
        <?php
       $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
       while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
         $products_options_array = array();
         $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
         while ($products_options = tep_db_fetch_array($products_options_query)) {
           $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
           if ($products_options['options_values_price'] != '0') {
             $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
        }
    	 }
    	 if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
    	 $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
       }
       else {
    	 $selected_attribute = false;
       }
     ?>
      <tr>
        <td valign="top" align="left" class="item" colspan="3">     </td>
      </tr>
     <tr> 
        <td valign="top" align="left" class="item"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
     <td valign="top" align="left" class="item">     </td>
     <td valign="top" align="left" class="item"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, ' class="item" '); ?></td>
         </tr> 
        <?php
     }
     ?>
  	 </table>
       <?php
  	 }
  	 ?>
     </td>
   </tr>
     <?php
     if (tep_not_null($product_info['products_url'])) {
     ?>
   <tr>
     <td class="item"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
         </tr>
     <?php
     }
     ?>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td class="item">
	 
    <table width="75%" cellspacing="0" cellpadding="0" border="0">
      <tr>
     <td>
     
       <table width="75%" cellspacing="15" cellpadding="0" border="0">
      <tr>
        <td width="33%" align="center" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
     <td align="center" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
     <td width="33%" align="center" valign="middle"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
      </tr>
  	 </table>
  	 
     </td>
   </tr>
    </table>
    
	 </td>
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
   
     <?php
	 $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
	 $reviews = tep_db_fetch_array($reviews_query); 	 
	 if ($reviews['count'] > 0) {
	 ?>
   <tr>
     <td class="item">
	 
    <table width="75%" cellspacing="5" cellpadding="0" border="0">
      <tr>
     <td align="left" valign="middle" class="item"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
   </tr>
    </table>
    
	 </td>      
   </tr>
   <tr>
     <td>
	 
    <table width="75%" border="0" cellpadding="0" cellspacing="0" class="wt_bodyhg">
      <tr>
     <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
   </tr>
    </table>
    
	 </td>
   </tr>
     <?php
	 }
	 if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
	 ?>
   <tr>
     <td class="item">
	 
    <table width="75%" cellspacing="5" cellpadding="0" border="0">
      <tr>
     <td align="center" valign="middle" class="item"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
   </tr>
    </table>
    
	 </td>      
   </tr>
     <?php
	 } else {
	 ?>
   <tr>
     <td class="item">
	 
    <table width="75%" cellspacing="5" cellpadding="0" border="0">
      <tr>
     <td align="center" class="item"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
   </tr>
    </table>
    
	 </td>      
   </tr>
     <?php
	 }
	 ?>
   <tr>
     <td>
	 
    
    
	 </td>
   </tr>
   <tr>
     <td class="item">
    <?php
      if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_also_purchased(3600);
   } else {
   include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
   }
    ?>
	 </td>
   </tr>
   <tr>
     <td>
	 
    
    
	 </td>
   </tr>
 </table>
 
 </form>
 
   </td>
  
<!-- body_text_ende //-->



 

 </tr>
</table>




<!-- body_ende //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_ende //-->

</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Sorry for this monster posting, but I am working on this problem now for 8 Days, also on chrismas an new years day until deep in the night an would appreaciate any help.

 

Greetnings from Germany

Link to comment
Share on other sites

after looking through the code, this mod will certainly not work as is with the Seperate Pricing Per Customer modification. Getting it to work with the Header Tags shouldn't be a real issue, but ANY suggestions would be appreciated for integrating this mod in with Seperate Pricing.

 

Thanks in advance!

Link to comment
Share on other sites

I WANT TO INSTALL THIS MOD!!! :'(

I JUST DOWNLOADED THE MASTER PRODUCTS FILE INTO MY COMPUTER. IT IS A WINRAR COMPRESSED FILE. WHEN I OPENED THE FILE IN WINRAR THERE ARE NO INSTRUCTIONS FOR INSTALLATION.

1. DO I HAVE TO COPY AND PASTE ALL THE FILES? IF SO, WHERE?

2. IS THERE SUPPOSED TO BE AN AUTO INSTALL FILE?

3. MY OSCOMMERCE IS ALREADY AN INSTALLED FILE (HOST: PLESK WITH A MYSQ SERVER.)

I NEED TO KNOW THE EXACT INSTALLATION STEPS.

4. HOW DO I GET THE MP SOFTWARE DATA TO INSTALL IN THE CORRRECT LOCATION IN THE PLESK CONTROL PANEL? . FOR THAT MATER HOW DO I GET THE DATA TO BE READABLE. WHEN I TRIIED TO UNCOMPRESS THE FILES TO PUT INTO MY FTP TRANSFER I COULDNOT OPEN THEM OUTSIDE OF WINRAV.

 

PLEASE HELP GUIDE ME SO I CAN INSTALL THIS MOD!

 

SINCERELY,

BAMBI

Link to comment
Share on other sites

INTALLATION OF MASTER PRODUCTS:

 

I COPIED AND PASTED THE PAGES, HOPE IT WORKS, I COULD NOT FIND DETAILED INSTRUCTIONS SO I GUESSED.

WHEN I FINISHED THE FILE PAGES I WENT BACK TO THE TEXT PAGE "MYSQL" IT SAID "Run the master.sql file on your database." HOW DO I DO THAT? WHICH FILE DO I PUT IT IN?

 

MY OSCOMMERCE IS HOSTED ON A PLESK WITH A MYSQL SERVER. YOU GUYS MUST HAVE GONE THREW THIS STEP BEFORE. PLEASE HELP WITH THIS INSTALL!

 

SINCERELY BAMBI

Link to comment
Share on other sites

MASTER PRODUCTS INSTALL

 

WELL COPY AND PASTEUP DID NOT WORK :'(

WHEN I WENT INTO THE STORE CONFIG TO ADD ITEMS THIS IS WHAT IT SAYS:

 

"1054 - Unknown column 'p.products_master' in 'field list'

 

select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_master, p.products_master_status, p.products_listing_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by p.products_master

 

[TEP STOP]

THERE IS NO PRODUCTS AND NO BOXES TO EDIT PRODUTS, NOTHING BUT NON EDITABLE CATAGORY TITLES.

IT IS WIERD BECAUSE WHEN I WENT TO THE TEST STORE THE PRODUCTS WERE SHOWING UP ON THE SIDE BAR SPECIALS AND NOWHERE ELSE!

 

WHAT HAPPENED??? HELP HELP!!!! :'(

 

SINCERELY,

BAMBI

Link to comment
Share on other sites

1054 - Unknown column 'p.products_master' in 'field list'
PLEASE DON'T USE ALL CAPS, IT IS HARD TO READ!!!

Anyway, it means that you didn't run the sql file. It is most often done in phpMyAdmin. Hardly use it myself, so you have to look for yourself or find their website with the manual.

 

Good luck.

Link to comment
Share on other sites

PLEASE DON'T USE ALL CAPS, IT IS HARD TO READ!!!

Anyway, it means that you didn't run the sql file. It is most often done in phpMyAdmin. Hardly use it myself, so you have to look for yourself or find their website with the manual.

 

Good luck.

 

 

Jan,

I looked into the phpadmin for mysql, their is only a reference to "configuration values" in the configuration catagory. There is no reference to configuration_group VALUES or ALTER TABLE products. Which are both additional instructions to run on the database. Do you remember, or does anyone out there remember this final install detail?

 

Many thanks ahead of time!

 

sincerely,

Bambi :rolleyes:

Link to comment
Share on other sites

Bambi,

 

This is not supposed the place to get a tutorial on how to use phpmyadmin. However, if you get into that section you should see your database in the left (blue) column. Click on it and I think you will see a screen on the right that toward the bottom shows a big text field with:

Run SQL query/queries on database phpmyadmin

 

Below that is a section called Or Location of the textfile:? and that is were you click on the button CHOOSE FILE, browse to the sql file on your hard disk and hit the GO button. That should do it. Not a bad idea to make a backup of the database in your osC admin section first...

Link to comment
Share on other sites

Bambi,

 

This is not supposed the place to get a tutorial on how to use phpmyadmin. However, if you get into that section you should see your database in the left (blue) column. Click on it and I think you will see a screen on the right that toward the bottom shows a big text field with:

Run SQL query/queries on database phpmyadmin

 

Below that is a section called Or Location of the textfile:? and that is were you click on the button CHOOSE FILE, browse to the sql file on your hard disk and hit the GO button. That should do it. Not a bad idea to make a backup of the database in your osC admin section first...

 

THANK YOU JAN :D

So far everything looks good, except:

 

1. All of my store items are not in alphabetical order any more! What happened? How do I get them back in alphabetical order? I see a lot of instructions on attributes but I need it for the standard cataloge items.

 

2. Also does anybody out there know how to separate the sets of master and slaves if someone needs to order 2 or more of the same master with their own set of slaves. I need to be able to identify them seperatly for creating the finished products. My Masters have about 138 slaves each, people will order more than 1 Master. Is there a way to possiblly ID. or name, the Master and Slave set, each time the client hits Buy Now? Just a crazy thought :blink:

 

Thank you Thank you,

Bambi

Link to comment
Share on other sites

I can't seem to find a good example so I figured I would ask. Only example I saw was a vanilla install from a year ago, wasn't sure if that was the current function.

 

Does MP do this?

 

Basicly I sell an item, the item can be blank or personalized, but since there are so many personalization options I couldn't just charge extra for typing in the text box (using option type feature). So what I was hoping to do was have the item listed, then give them a choice of putting the personalized item in their cart or the blank item.

 

So it would be like this:

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

Items So&So 
This lovely So&So is perfect for doing anything. Makes a great gift and even
cleans your bathroom. 


Item So&So -Blank            qty         "add to cart"
----------------------------------------------------------
Item So&So - Personalized 
-attribute option 1
-attribute option 2
-attribute option 3      
                            qty          "add to cart"
 

I don't want the items to be at the bottom of the page as "additional items" I need them to both be a selection available where add to cart features are now, just one extra add to cart option under it.

 

Can this be done? Is it just a matter of reformatting the slave box area and moving it to where I need it to be?

 

Thanks for any help with this, I have a ton of mods, and wasn't really sure I could handle trying to make this work if it couldn't do what I needed.

 

Thanks again,

:)

Edited by WebPixie
Link to comment
Share on other sites

THANK YOU JAN :D

So far everything looks good, except:

 

1.  All of my store items are not in alphabetical order any more! What happened? How do I get them back in alphabetical order? I see a lot of instructions on attributes but I need it for the standard cataloge items.

 

2. Also does anybody out there know how to separate the sets of master and slaves if someone needs to order 2 or more of the same master with their own set of slaves. I need to be able to identify them seperatly for creating the finished products. My Masters have about 138 slaves each, people will order more than 1 Master.  Is there a way to possiblly ID. or name, the Master and Slave set, each time the client hits Buy Now? Just a crazy thought :blink:

 

Thank you Thank you,

Bambi

 

In this Form I located information about "Custom Group Id" for building multiple custom orders. It may work but I can not locate everything or write the proper hidden code it talks about.

The information I need is exact file locations and code for setting a hidden random group ID that is discussed in http://www.oscommerce.com/forums/index.php?sho...ndpost&p=480355.

 

Has any one successfully used this contribution with multiple attributes?

 

Thank you

:thumbsup: Sincerely,

Bambi

Link to comment
Share on other sites

can I have a product be slave of many master products?
Yes, you can but not out of the box. Hidden in this forum there has been a discussion on it. I use the sql query that I mentioned there and it works fine. The drawback is that you then have to manually add slaves - master relation ships with phpMyAdmin for every slave product. It is not integrated in the admin section.
Link to comment
Share on other sites

Hi Peoples,

 

sorry for my terrible English.

I have a Problem and no Answer.

 

I would like put a Master Product with Slaves as a Single Product in my Shopping-Cart.

But its impossible.

I think this Code in product_info.php is the Problem:

 

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_slave')); ?>

 

gives a Solution for this Problem ??.

Please Help me someone.

 

Many Thanks.

 

P.S. Sorry for my terrible English.

Link to comment
Share on other sites

In this Form I located information about "Custom Group Id" for building multiple custom orders. It may work but I can not locate everything or write the proper hidden code it talks about.

The information I need is exact file locations and code for setting a hidden random group ID that is discussed in http://www.oscommerce.com/forums/index.php?sho...ndpost&p=480355.

 

Has any one successfully used this contribution with multiple attributes?

 

Thank you

:thumbsup: Sincerely,

Bambi

 

 

That was me making the addition of the group_id for master and slaves. It is working wonderfully for me, but I just haven't had the time to pull it into a contribution yet as I am slammed with work and I'm on a four week count down until my maternity leave starts so I'm trying to get everything done. *wish me luck* I hope to have some time during my leave to formally pull together the code changes and add it to the contribution.

 

But if you want to code it yourself, the basic jist of it is to create a hidden attribute for the master and slave products called group_id. Then when the product page loads for the master, create a random number or alphanumeric identifier and assign it to all the attributes called group_id..then when the product gets added to the cart, the group_id goes with it as an attribute (I've hidden it from all the displays,etc.). Then when you need to change quantities or delete the master/slave group, you just look for all the products with that group_id and treat them together.

 

Hope that helps in the meantime...

 

-Dionn

Link to comment
Share on other sites

  • 3 weeks later...

How to get it working whit the Total B2B 1.2b contribut

 

I installed this great contribut on a clean Ms2, and everything worked perfect. Exactly what i wanted. But on my live shop i use the "total B2B 1.2b contr." The admin area works perfect, but when im clicking on a product in the product listing, im just coming to a empty page. The product info is not showing. I thougt i had done somethint wrong and tried to copy the old product_info.php and the product_info.php from the "clean" page.

 

Does anyone have a clue of what?s wrong?? I must get this two working with each other!

 

A tip anyone where i should begin to searchfor the fault??

 

*bad english i know* =)

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

I've added the "attributes" mod to the master products contribution and the attributes are showing correctly, but no matter what I do, when place an order the next page says that my shopping cart is empty. Any ideas?

 

Also, does anyone have some quick code to change the drop down box to an entry box and default to 0?

 

Thanks,

 

Shaby

Link to comment
Share on other sites

In catalog/includes/new_products.php change the db queries to:

 

 ?if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
? ?$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and products_master = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
?} else {
? ?$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and products_master= '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
?}

 

I have simply added:

 

and products_master = '0'

 

You could also use:

 

and products_listing_status = '1'

 

This latter will allow you to control which slaves show and which do not via the product edit page 'listing status' - perhaps the better option.

 

You can do the same in catalog/includes/boxes/whats_new.php and elsewhere  :D

 

Take a look at the  catalog/products_new.php included with the package for more ideas on how to control display.

 

I have followed Matti's guide here and it works like a champ! Only thing is when your viewing a product and you click on the 'Other Products' from the Manufactuers box ... it brings you back to index.php and shows all items from the manufactuer including slaves.

 

Anybody know how I can addapt the same idea into this - to only display masters ... or only products with listing status = 1 ?

 

Any help would be appreaceated.

 

Thanks,

dilirum

Link to comment
Share on other sites

I get this error on my categories page.

Fatal error: Call to undefined function: tep_get_products_info() in D:\vsites\xs\root\html\admin\categories.php on line 1085

 

it happens wheni choose the item. its really wierd. on line 1085 this is what i have.

 

 $languages = tep_get_languages();
   for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
     if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
       $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);
 $pInfo->products_info = tep_get_products_info($pInfo->products_id, $languages[$i]['id']);
       $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']);
       $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);
     } else {
       $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);
 $pInfo->products_info = tep_db_prepare_input($products_info[$languages[$i]['id']]);
       $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);
       $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);
     }

 

$pInfo->products_info = tep_get_products_info($pInfo->products_id, $languages[$i]['id']);

Link to comment
Share on other sites

Hello Colin,

 

My thoughts exactly....checked the tables a couple times and even rebuilt the product_info.php file from hand twice now.? I still run into the same problem.

 

Here is a link to the page I'm having the problem with...

 

http://heavenstherapy.org/hteshop/product_...&products_id=29

 

It looks as if the master_listing.php attributes are larger than the attributes set for product_info.php and its causing it to overflow.

 

Again Im using the STS Template contribution and Master Products 1.5...maybe I just dont get the concept...do I need to not add the Master Products Code to the products_info.php file but to a STS Template file?

 

Your Help is greatly appreciated!

 

Let me know if there is anything else I can offer to solve this one.

 

Thanks Again!

 

i have exactly same issue, over 11 hours spent. just cant fix the html. rrr... killing me.... this is my code for product listing. commented out.

<?php
?require('includes/application_top.php');

?require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

?$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)$HTTP_GET_VARS['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);
?>

<!-- begin dynamic meta tags query -->
<?php
$the_product_info_query = tep_db_query("select pd.language_id, 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 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'" . " and pd.language_id ='" . ?(int)$languages_id . "'"); 
? $the_product_info = tep_db_fetch_array($the_product_info_query);
$the_product_name = strip_tags ($the_product_info['products_name'], "");
$the_product_description = strip_tags ($the_product_info['products_description'], "");
$the_product_model = strip_tags ($the_product_info['products_model'], "");
?>
<?php
$the_manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p ?where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id"); 
? $the_manufacturers = tep_db_fetch_array($the_manufacturer_query);
?>
<!-- end dynamic meta tags query -->

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>

<!-- begin dynamic meta tags -->
<title><?php echo TITLE ?>: <?php echo $the_product_name; ?></title>
<meta name="keywords" content="<?php echo TITLE ?>, <?php echo $the_product_name; ?>, <?php echo $the_product_model; ?>, <?php echo $the_manufacturers['manufacturers_name']; ?>">
<meta name="description" content="<?php echo $the_product_description . "," . $the_product_name . "," . $the_manufacturers['manufacturers_name']; ?>">
<!-- end dynamic meta tags -->

<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"><!--
function popupWindow(url) {
?window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></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 border="0" width="100%" 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 '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0">	

<?php
// Master Products EOF
?if ($product_check['total'] < 1) {
?>
? ? ?<tr>
? ? ? ?<td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></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 align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
? ? ? ? ? ? ? ?<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
? ? ? ? ? ? ?</tr>
? ? ? ? ? ?</table></td>
? ? ? ? ?</tr>
? ? ? ?</table></td>
? ? ?</tr>
<?php
?} else {
//Master Products ? ?
? ?$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_master_status, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
//Master Products EOF
? ?$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)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

? ?if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
? ? ?$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
? ?} else {
? ? ?$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
? ?}

? ?if (tep_not_null($product_info['products_model'])) {
? ? ?$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
? ?} else {
? ? ?$products_name = $product_info['products_name'];
? ?}
?>
? ? ?<tr>
? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
? ? ? ? ?<tr>
? ? ? ? ? ?<td class="pageHeading" valign="top"><?php echo $products_name; ?>     <?php echo (($product_info['products_quantity'] > 0) ? '' : '<img src="../images/outofstock.gif" alt="Out Of Stock" >'); ?></td>
? ? ? ? ? ?<td class="pageHeading1" align="right" valign="top"><?php echo (($product_info['products_price'] > 0) ? $products_price : '<img src="../images/call4price.gif" alt="" >'); ?></td>
? ? ? ? ?</tr>
? ? ? ?</table></td>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td class="main">
<?php
? ?if (tep_not_null($product_info['products_image'])) {
?>
? ? ? ? ?<table border="0" cellspacing="0" cellpadding="2" align="right">
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow2(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
? ? ? ? ? ? ?</td>
? ? ? ? ? ?</tr>
? ? ? ? ?</table>
<?php
? ?}
?>
<!-- ?	<p><b><?php // echo stripslashes($product_info['products_info']); ?></b></p> -->
? ? ? ? ?<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
? ?$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
? ?$products_attributes = tep_db_fetch_array($products_attributes_query);
? ?if ($products_attributes['total'] > 0) {
?>
? ? ? ? ?<table border="0" cellspacing="0" cellpadding="2">
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
? ? ? ? ? ?</tr>
<?php
? ? ?$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
? ? ?while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
? ? ? ?$products_options_array = array();
? ? ? ?$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
? ? ? ?while ($products_options = tep_db_fetch_array($products_options_query)) {
? ? ? ? ?$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
? ? ? ? ?if ($products_options['options_values_price'] != '0') {
? ? ? ? ? ?$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
? ? ? ? ?}
? ? ? ?}

? ? ? ?if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
? ? ? ? ?$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
? ? ? ?} else {
? ? ? ? ?$selected_attribute = false;
? ? ? ?}
?>
? ? ? ? ? ?<tr>
? ? ? ? ? ? ?<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
? ? ? ? ? ? ?<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
? ? ? ? ? ?</tr>
<?php
? ? ?}
?>
? ? ? ? ?</table>
<?php
? ?}
?>
? ? ? ?</td>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr>


? ? ? <tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ? </tr> ? ? 
<?php
? ?if ($product_info['products_price']>0) {
? 
? ?$qty_array = array();
? 
? ?for ($i=1; $n2 = (($product_info['products_quantity'] < 20) ? $product_info['products_quantity'] : 20), $i <= $n2; $i++) {
? ?
? ?$qty_array[] = array('id' => $i, 'text' => $i); 
}
?>
? ? ?<tr>
? ? ? ?<td align="right" class="main">
?
?<?php if ($product_info['products_quantity'] > 0) {
? ? ?echo TEXT_QUANTITY . '  ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array); 
? ? ?} elseif ((STOCK_CHECK == 'false')&& ($product_info['products_quantity'] < 1)) {
? ? ?	$qty_array = array();
? ? ? ? ? ?for ($i=0; $ns = 20, $i <= $ns; $i++) {
? ? ? ? ? ?$qty_array[] = array('id' => $i, 'text' => $i); 
? ? ? ?} ? ? 
? ? ?echo TEXT_QUANTITY . '  ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array);
? ? ?} else {
? ? ?echo TEXT_STOCK;
}
? echo tep_draw_separator('pixel_trans.gif', '30', '10');
?>
? ? ? ?</td>
? ? ?</tr>
<?php
}
?> ?
<?php
? ?$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
? ?$reviews = tep_db_fetch_array($reviews_query);
? ?if ($reviews['count'] > 0) {
?>
? ? ?<tr>
? ? ? ?<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr>
<?php
? ?}

? ?if (tep_not_null($product_info['products_url'])) {
?>
? ? ?<tr>
? ? ? ?<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
? ? ?</tr>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr>
<?php
? ?}

? ?if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
? ? ?<tr>
? ? ? ?<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
? ? ?</tr>
<?php
? ?} else {
?>
? ? ?<tr>
? ? ? ?<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
? ? ?</tr>
<?php
? ?}
?>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr>


<?php

$master_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_master = ?'" . (int)$HTTP_GET_VARS['products_id'] . " '");
$results = tep_db_fetch_array($master_query);
if (($results['products_id'] != null) && ($product_info['products_master_status'] == 1)) { ?>

? <tr>
? ?<td align="left" class="main"> <?php echo TEXT_SLAVE_PRODUCTS; ?></td>
? </tr>
? ? ?<tr>
? ? ? ?<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
? ? ?</tr> 
? <tr>
? ?<td><?php ?include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTS); ?></td>
? </tr>
? 
<?php ? ?
?} 
}
?>





? ? ?<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 '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
? ? ? ? ? ? ? ?<td class="main" align="right">
? ? ? ?<?php // echo (($product_info['products_price'] > 0) ? tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) : ''); ?>

? ?<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . (($product_info['products_quantity'] > 0) ? (($product_info['products_price'] > 0 ) ? tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) : '') : tep_image_submit('button_back_order.gif', 'Back Order' )); ?></td>
? ?<?php //echo tep_draw_hidden_field('products_id', $product_info['products_id']) . (($product_info['products_price'] < 1) ? '' . (($listing['products_quantity'] > 0 ) ? tep_image_submit('button_back_order.gif', IMAGE_BUTTON_IN_CART) :'') : tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART )); ?>

? ? 
? ? ? ? ? ? ? ?<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>
<!-- Family Products //-->

<?php

$family_query = tep_db_query("select products_family from " . TABLE_PRODUCTS . " where products_id = ?'" . (int)$HTTP_GET_VARS['products_id'] . "' order by products_price desc");
$results = tep_db_fetch_array($family_query);
if ($results['products_family'] != null) { ?>

? <tr>
? ?<td align="left" class="main"> <b><?php echo TEXT_FAMILY_PRODUCTS; ?><b></td>
? </tr>
? <tr>
? ?<td><?php include(DIR_WS_MODULES . FILENAME_FAMILY_PRODUCTS); ?></td>
? </tr>
? 
<?php ? ?
?} ? ? 
?>
<!-- Family Products EOF //--> ? ? ? 
? ? ?<tr>
? ? ? ?<td>
<?php
? ?if ((USE_CACHE == 'true') && empty($SID)) {
? ? ?echo tep_cache_also_purchased(3600);
? ?} else {
? ? ?include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
? ?}
?>
? ? ? ?</td>
? ? ?</tr>
? 
? 
? ?</table></td>

<!-- Master Products EOF ?here //--> ? ?
<!-- 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>
<!-- here -->
<!-- body_eof //-->

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

Edited by 211655
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...