Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Yes - It is the X-sell products contribution - I just commented out the

include(DIR_WS_MODULES . 'xsell_cart.php');

and the shopping_cart.php page works correctly again! YAY!

 

Now for all of my questions - LOL

- how do I find what is causing the error on the xsell_cart.php file?

- Would it help if I posted the xsell_cart.php code in its entirety?

- Why would it go from working correctly to suddenly not working when there were no code changes?

- elsewhere I've been told I need to strip the {} attribute ID out of the Products ID Number - but I cannot find any info on how to do that. Would this be specific to just the xsell contribution - or generalized in something like application_top.php?

 

On the upside - with that include commented out at least our top selling product is purchasable through the site again! WOOHOO!! (dancing smiley here)

 

On the downside - it means that until we figure out what's causing the problem we can't suggest other products in the shopping cart based on the customers existing product choices. But that's a much better problem than not being able to purchase a product!

 

Thank you SOOO much for your help so far and for any other assistance you may be able to provide :D

 

Hmmm - could it be the X-Sell contribution? I have a includes/modules/xsell_cart.php file with this query:

$xsell_master_query = tep_db_query("SELECT products_master FROM " . TABLE_PRODUCTS . " WHERE products_id = " . $product_id_in_cart['id'] . "");

 

includes/modules/master_products.php has a similar query - but it uses the "LIKE" statement so I don't think it's the right one- but here it is just in case

$master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master LIKE '%" . $HTTP_GET_VARS['products_id'] . "%' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0");

 

These are the only two places I can find the query string

tep_db_query("select products_master from

in the entire site.

~Tracy
 

Link to comment
Share on other sites

Well, it depends on how the data field is defined. If it's an integer, that 128{1}7 won't work. If it's character (text), it might work, but you need to change

" WHERE products_id = " . $product_id_in_cart['id'] . "");

to

" WHERE products_id = '" . $product_id_in_cart['id'] . "'");

(put single quotes around the value). Worth a try.

Link to comment
Share on other sites

Thank You Thank You MrPhil!! :D

 

Adding the single quotes worked like a charm!! You're a life saver!! (or at least a site saver - LOL) ;)

 

Thank you so much - it is all working wonderfully again :thumbsup:

 

Well, it depends on how the data field is defined. If it's an integer, that 128{1}7 won't work. If it's character (text), it might work, but you need to change

" WHERE products_id = " . $product_id_in_cart['id'] . "");

to

" WHERE products_id = '" . $product_id_in_cart['id'] . "'");

(put single quotes around the value). Worth a try.

~Tracy
 

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I have a problem in product_info.php.

When trying to sort slave products on "name" I get this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 100' at line 1

select pd.products_name, p.products_id, p.manufacturers_id, p.products_tax_class_id, s.specials_new_products_price, s.status, p.products_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_master = '7761' and p.products_status = '1' and pd.language_id = '1' order by limit 0, 100

 

I can sort on model without any problem, but when I click on Name I get this error..

Link to comment
Share on other sites

The query is being built incorrectly, with no field name for the "order by" clause (...order by name_field limit 0...). The code needs to be fixed to either drop "order by" or add a field name there. Maybe the author has something to say here? This seems like a rather large bug to have escaped notice so far -- have you modified this code, or installed other mods on top of it?

Link to comment
Share on other sites

Hi all,

I just installed this great contribution (all as instruction execpt for product_info page wich was modified) but I'm having this problem:

 

Please give a look at http://www.oggi-sposi.it/partecipazioni-nozze-c-92.html to have an idea.

 

- I create a couple of slave products (the two "servizio stampa...") with "Show Product" check and I put them in the category "Servizi e Opzioni" (Under main category "Partecipazioni di Nozze").

 

- If I am in the main category listing, I can see that items in the new products box, but if I click on the specific category "Servizi e Opzioni", I get this message: "There are no products to list in this category.".

The same problem occours even If i move that item in the top category or in the same of the master product (New Classic Line).

 

So I can't have a list of theese slave items.

 

Any idea where could be the problem? I checked index.php and modules/product_listing.php and there is no problem.

 

Hope you can help me.

THanks

Nadia

Link to comment
Share on other sites

Hi.

Im looking for some suggestions on what could be wrong with my install.

I have just put in Master Products and all products(master, slave and standard) aren't showing at all in their respective categories.

They all show up as expected in manufacturers lists and new products.

I have been over my install a few times now and either cant see my mistake or I have a conflicting contribution.

I have tried removing a few contribs that I thought may have attributed to this behaviour but nothing changes so I assume I have made a mistake.

Any suggetions would be appreciated.

Link to comment
Share on other sites

I finally figured out my issue and Im curious as to know why this is happening.

I had played around with it on standard installs before and haven't come across this.

All of my products now show up as they should with master products installed or they seem to be at the moment anyway.

By removing this

 and p.products_master = '0'

from this section on /index.php

//Master Products
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
// Master Products EOF

 

Are there any consequences I should know about that Ill run into by leaving it removed.

Link to comment
Share on other sites

Master Products have a products_master of 0, slave products have a products_master that is the same as the products_id of their master products. So if you are only wanting to pull info on the "Masters" then you want where p.products_master = '0' - if you want to pull info on both masters and slaves in the query, then you can leave it off.

 

I finally figured out my issue and Im curious as to know why this is happening.

I had played around with it on standard installs before and haven't come across this.

All of my products now show up as they should with master products installed or they seem to be at the moment anyway.

By removing this

 and p.products_master = '0'

from this section on /index.php

//Master Products
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
// Master Products EOF

 

Are there any consequences I should know about that Ill run into by leaving it removed.

~Tracy
 

Link to comment
Share on other sites

  • 2 weeks later...

Screen shots will vary depending on how a person is using the contribution. You can see how we've used it at www dot MountainMeadowHerbs dot com. We use the master product as the description and the slave products for the various different sizes available (each size has it's own model number so we couldn't just use the attributes for the different sizes).

 

Other people use it differently and some have master products that are available for purchase as well as the slaves.

 

Can someone post screen shots... I didn't see any in the packages like they were claim in previous forums.

 

 

Thanks,

~Tracy
 

Link to comment
Share on other sites

Screen shots will vary depending on how a person is using the contribution. You can see how we've used it at www dot MountainMeadowHerbs dot com. We use the master product as the description and the slave products for the various different sizes available (each size has it's own model number so we couldn't just use the attributes for the different sizes).

 

Other people use it differently and some have master products that are available for purchase as well as the slaves.

 

 

Thanks,.... Nice site, can I ask what 'products Tab' contrib are you using?

Link to comment
Share on other sites

  • 1 month later...

Screen shots will vary depending on how a person is using the contribution. You can see how we've used it at www dot MountainMeadowHerbs dot com. We use the master product as the description and the slave products for the various different sizes available (each size has it's own model number so we couldn't just use the attributes for the different sizes).

 

Other people use it differently and some have master products that are available for purchase as well as the slaves.

 

Hi, Tracy

 

Been quite awhile since I looked at your site. Site looks really nice. Good work on the tabs, too.

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

  • 1 month later...

The instructions seem incorrect.

 

I have read the instructions for Master Products Rc2a V1.23

(Master_Products_guide.html#4). The instructions for modifying

catalog/categories.php

seems incorrect.

 

Modification 4 says to insert some code:- AFTER the case condition,

but before the two closing curly barckets.

 

But the code it says to insert is the same (line for line) as the

case condition above it!

 

Plus, if I followed the instructions exactly the new code wouldn't run

anyway because there is a "break;" above it!

 

Can anyone please clarify

Link to comment
Share on other sites

I found the solution. It is in the v 1.2 assembled download.

 

Line 407 of catalog/admin/categories.php shows the correct code to paste in.

 

Great timing, thank you, that solved the image upload problem I was having!

 

I'm having problems seeing my slaves on product_info.php. None of them show up at all. The Master shows up great on the index.php and I'm not receiving any errors anywhere.

 

The slaves do show up on products_new, so I know things are almost there. But, I can't seem to figure it out. I have this contribution working on the same version of Oscommerce but this new site is a different template (a purchased template).

 

Any ideas from the few remaining Master Products gurus? Thank you.

 

Edit: I forgot to mention that when I put in the code changes for includes/classes/currencies.php, the site just loads a blank white page. This is what i'm putting in:

 

//Master Products
   function display_price($products_price, $products_tax, $quantity = 1) {
       if($products_price == '0') {
       return '';
     }else{        
     return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
     }
   }
//Master Products EOF

Edited by qxonn
Link to comment
Share on other sites

I fixed my currencies.php problem thanks to a previous forum post. Going through all the old posts and making all the changes that are surprisingly not in the latest 1.23 download. I am still having issues having the slaves display at all on the product_info.php page. I have triple checked code with my other site that has it working and am at a loss. Will continue going through, but if someone here reads this and may have some suggestions that would be greatly appreciated.

Link to comment
Share on other sites

The contribution has been upgraded to V 1.25. Please ask your questions only in this support thread. I've included old bugfixes and changes suggested by users starting from year 2006 in this thread.

 

db_developer spotted error on october 11. has been corrected.

Edited by luckyno

I love oscommerce and OS software! I'm not a programmer, I'm only a learning boy and a translator :) I love full contribution packages!

Link to comment
Share on other sites

The contribution has been upgraded to V 1.25. Please ask your questions only in this support thread. I've included old bugfixes and changes suggested by users starting from year 2006 in this thread.

 

db_developer spotted error on october 11. has been corrected.

 

Thank you for your hard work. I'm going to take a look and see if I can finally get this finally working fully with my new server.

Best,

 

Matt

Link to comment
Share on other sites

I still can't get the slaves to appear on product_info.php. I have a reasonably modified template and I not very experience with PHP. If someone out there could check this code and get back to me, or any other suggestions, you would be a life saver.

 

The site page can be seen here: http://www.alchemyindustrial.net/product_info.php?products_id=115 there should be two slaves under that master. As you can see, this is a brand new template just installed. Master Products is the first contribution being added.

 

<?php
/*
 $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 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);
 //added by admin  showing the master for slave products
$master_query1 = tep_db_query("select products_id,products_master from " . TABLE_PRODUCTS . " where products_id =  '" . (int)$HTTP_GET_VARS['products_id'] . " '");
$results1 = tep_db_fetch_array($master_query1);
if (($results1['products_master'] != NULL) &&($results1['products_master'] != 0) ) {
$HTTP_GET_VARS['products_id']=(int)$results1['products_master'];
}
//end of code added by admin  showing the master for slave products
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<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="stylesheet.css">

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<body>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">
<tr>
   <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php include(DIR_WS_BOXES . 'panel_top.php');?>


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


<?php
$master_status_query = tep_db_query("select p.products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$master_check = tep_db_fetch_array($master_status_query);
if ($master_check['products_master_status'] > 0) {
?> 
<?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') . '">'; ?>
<?php
}
else {
?>
<?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="100%" cellspacing="0" cellpadding="0">
<?php
}
?>


<?php
 if ($product_check['total'] < 1) {
?>
<?php echo tep_draw_top();?>

<?php echo tep_draw_title_top();?>

               <?php echo TEXT_PRODUCT_NOT_FOUND; ?>

<?php echo tep_draw_title_bottom();?>

<?php echo tep_draw1_top();?>

<?php echo tep_draw_infoBox2_top();?>

           <table border="0" width="100%" cellspacing="0" cellpadding="2">
               <tr><td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td></tr>
           </table>

<?php echo tep_draw_infoBox2_bottom();?>

<?php echo tep_draw1_bottom();?>

<?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_price2 = '<span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span><br><s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>';
   } else {
     $products_price2 = '<span class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</span>';
   }

   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>   <b class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</b>';
   } else {
     $products_price = '<b class="productSpecialPrice">'.$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])).'</b>';
   }

   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'];
   }
?>

<?php echo tep_draw_top();?>

<?php echo tep_draw_title_top();?>

               <div class="left_part"><?php echo $breadcrumb->trail(' » ')?> »  <?php echo $products_name; ?></div><div class="right_part"><?php echo $products_price2; ?></div>

<?php echo tep_draw_title_bottom();?>

<?php echo tep_draw1_top();?>

       <?php /*  echo tep_draw2_top();  */ ?>

<?php /*  echo tep_pixel_trans();  */?>

<?php
   if (tep_not_null($product_info['products_image'])) {
?>



<div class="main prod_info" style="width:<?php echo (SMALL_IMAGE_WIDTH +23);?>px;">

<?php echo tep_draw_prod_pic_top();?><script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . 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, '') . '</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, '') .  '</a>'; ?></noscript><?php echo tep_draw_prod_pic_bottom();?>

<script language="javascript"><!--
document.write('<?php echo '<a class="enlarge" href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript><?php echo '<a class="enlarge" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' .  TEXT_CLICK_TO_ENLARGE . '</a>'; ?></noscript></div>    
<?php
   }
?>
<div class="main"><div class="desc2"><?php echo stripslashes($product_info['products_description']); ?></div><br>
                 <br><div><?php echo $products_price?></div></div><br>
<div style="clear:both;"></div>


       <?php /*  echo tep_draw2_bottom();  */?>

<div class="cart_line_x padd3_gg"><?php echo tep_draw_separator('spacer.gif', '1', '2'); ?></div>        

       <?php  echo tep_draw2_top();  ?>

<?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="4" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><strong class="strong"><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></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><?php echo tep_draw_separator('spacer.gif', '1', '9'); ?></td><td></td></tr>
           <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 
   }

//Master Products
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
}
?>
</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=0; $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
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></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) {
?>
   <table cellpadding="0" cellspacing="4" border="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>
   </table>

<?php echo tep_pixel_trans();?>

<?php
   }

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>

<?php echo tep_pixel_trans();?>

   <table cellpadding="0" cellspacing="4" border="0">    
     <tr>
       <td class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
     </tr>
   </table>
<?php
   } else {
?>

<?php echo tep_pixel_trans();?>

  <table cellpadding="0" cellspacing="4" border="0">   
     <tr>
       <td class="main"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
     </tr>
   </table>
<?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 =  " . $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
}

?>

<?php echo tep_draw2_bottom();?>

<?php echo tep_pixel_trans();?> 

<div class="cart_line_x padd3_gg"><?php echo tep_draw_separator('spacer.gif', '1', '2'); ?></div>

   <?php /*  echo tep_draw2_top();  */ ?>

<?php echo tep_pixel_trans();?>
<?php echo tep_pixel_trans();?>

<?php  /* echo tep_draw_infoBox2_top(); */ ?>

           <table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>
               <td class="main button_marg"><?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 button_marg" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
             </tr>
           </table>

<?php  /* echo tep_draw_infoBox2_bottom(); */ ?>

       <?php /*  echo tep_draw2_bottom();  */?>


<?php echo tep_draw1_bottom();?>

<?php
   if ((USE_CACHE == 'true') && empty($SID)) {
     echo tep_cache_also_purchased(3600);
   } else {
    include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
 }
?>

<?php echo tep_draw_bottom();?>    

   </form></td>
<!-- body_text_eof //-->
   <td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

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

Link to comment
Share on other sites

Luckyno can you please describe what the addons do...my site has MasterProducts working properly for long time and am curious to see what you added to it.

 

Thanks!

 

Ricardo

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.
Note: Your post will require moderator approval before it will be visible.

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