Jump to content
Johnson

Master Products - MS2

Recommended Posts

Could someone explain plz, I have installed MasterProducts and Brian attribute contrib to enable attributes ok.

 

I have 1 master setup with 2 slave products and I have now setup attributes for the two slaves, I thought the attributes would be displayed for each slave.

 

Or have I done something wrong?

What isn't working? Are your slaves getting listed but no attributes? Or aren't you getting any slaves either?

 

Maybe a URL?

 

step 5: my file is not:

catalog/includes/english/master_products.php

but instead my file is:

catalog/includes/languages/english/master_products.php

 

step 6: my file is not:

catalog/includes/application.php

but instead my file is:

catalog/includes/application_top.php

 

step 7:

my configuration_group_id is not 22

but instead is: 16

 

Ok whodah. I'll correct these when I find out why its not working for you guys.

 

Brian.

Share this post


Link to post
Share on other sites

I have installed as per the instructions, and I am getting a list of slave products I have setup 4 now, with just name and price and quantity.

 

I have setup the attributes for the slaves only a few but they do not show, plz clarify where are the attributes supposed to show up?

 

http://www.elwynsbits.co.uk/basic

 

thx for the time this is a great addition to a great contribution

 

Just a quick add: the site is osc ms2 clean with only the master products and your contribution added to master products.

Edited by j0ker

Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

I have added now sts but I havnt altered anything that master products needs or the attributes addon.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Isnt this fun, I will attempt to install again, I have reinstalled the master product main files, and I will now edit as per brian's instructions, and see where we get again. for the attributes contrib.

Wish me luck, I think I will need it.

:D


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Ok then with my limited knowledge of PHP and all things osc I have not managed to get this attributes contrib working with the master products have tried a number of time no joy, I have tried a few suggestions but no joy.

 

I think I will leave it now for a fix to be sorted, I have a test site specially for this at http://www.elwynsbits.co.uk/basic if anyone wants to see what is happening I have installed sts in sheer frustration, to take me mind of this one not working.

 

Hop others have more joy than i do. :D


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

hello

is there anyway to list price under the master image for ex: if i have price from 12.95-19.95 for the slave products. how can display the price.

 

thanks

pj

Share this post


Link to post
Share on other sites

Which price do you want to display?

If it is individual it can be done. If you want a range it is probably best to include that in your description. Or you could have the prices as an image.

 

The solution for master price display was posted by ryan a few pages back.

Share this post


Link to post
Share on other sites
Another post to meself but I have changed the server the test is on it is now http://www.designedbyelwyn.co.uk/test I fubar'd the other one changed stuff too much confused myself.

What's the attribute sort order set to in admin? Make sure this is unique.

 

If you still get no joy, I'll need to see your catalog/includes/modules/master_listing.php and master_products.php.

 

Brian.

Share this post


Link to post
Share on other sites

I have set the sort order to 8 nothing else was using that so I figured it to be ok.

 

I will have another bash at it to save hassle you but if this goes t*ts up could you plz have a loook at the files for me.thx in advance.

Edited by j0ker

Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Nope cant get it to go, had to change sql also to 16 instead of 22 as the option wouldnt show in the menu otherwise. I will post below the 2 files


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

catalog/includes/modules/master_products.php

add 'MASTER_LIST_OPTIONS' => MASTER_LIST_OPTIONS,

 

<?php

/*

$ID master_products.php - JOHNSON - 05/07/2003 matti@suomedia.com

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Master Products - JOHNSON - 05/07/2003 matti@suomedia.com

 

Copyright © 2003 Suomedia - Dynamic Content Management

 

Released under the GNU General Public License

*/

 

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

 

$master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$thisquery = tep_db_fetch_array($master_query);

if ($thisquery['products_master'] != '0') {

 

$slave_list = array('MASTER_LIST_OPTIONS' => MASTER_LIST_OPTIONS,

'MASTER_LIST_MODEL' => MASTER_LIST_MODEL,

'MASTER_LIST_NAME' => MASTER_LIST_NAME,

'MASTER_LIST_MANUFACTURER' => MASTER_LIST_MANUFACTURER,

'MASTER_LIST_PRICE' => MASTER_LIST_PRICE,

'MASTER_LIST_QUANTITY' => MASTER_LIST_QUANTITY,

'MASTER_LIST_WEIGHT' => MASTER_LIST_WEIGHT,

'MASTER_LIST_IMAGE' => MASTER_LIST_IMAGE,

'MASTER_LIST_BUY_NOW' => MASTER_LIST_BUY_NOW,

'MASTER_LIST_DESCRIPTION' => MASTER_LIST_DESCRIPTION);

 

asort($slave_list);

 

$column_list = array();

reset($slave_list);

while (list($key, $value) = each($slave_list)) {

if ($value > 0) $column_list[] = $key;

}

 

$select_column_list = '';

 

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

switch ($column_list[$i]) {

case 'MASTER_LIST_MODEL':

$select_column_list .= 'p.products_model,';

break;

case 'MASTER_LIST_NAME':

$select_column_list .= 'pd.products_name, ';

break;

case 'MASTER_LIST_DESCRIPTION':

$select_column_list .= 'pd.products_description, ';

break;

case 'MASTER_LIST_MANUFACTURER':

$select_column_list .= 'm.manufacturers_name, ';

break;

case 'MASTER_LIST_QUANTITY':

$select_column_list .= 'p.products_quantity, ';

break;

case 'MASTER_LIST_IMAGE':

$select_column_list .= 'p.products_image, ';

break;

case 'MASTER_LIST_WEIGHT':

$select_column_list .= 'p.products_weight, ';

break;

}

}

 

$master_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_tax_class_id, s.specials_new_products_price, s.status, p.products_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 where p.products_id = pd.products_id and p.products_master = '" . $thisquery['products_master'] . "' and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'";

 

 

}

 

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {

if ($column_list[$i] == 'MASTER_LIST_NAME') {

$HTTP_GET_VARS['sort'] = $i+1 . 'a';

$master_sql .= " order by pd.products_name";

break;

}

}

} else {

$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);

$sort_order = substr($HTTP_GET_VARS['sort'], 1);

$master_sql .= ' order by ';

switch ($column_list[$sort_col-1]) {

case 'MASTER_LIST_MODEL':

$master_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'MASTER_LIST_NAME':

$master_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

break;

case 'MASTER_LIST_MANUFACTURER':

$master_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'MASTER_LIST_QUANTITY':

$master_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'MASTER_LIST_IMAGE':

$master_sql .= "pd.products_name";

break;

case 'MASTER_LIST_WEIGHT':

$master_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'MASTER_LIST_PRICE':

$master_sql .= "p.products_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

 

include(DIR_WS_MODULES . FILENAME_MASTER_LISTING);

 

?>


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

catalog/includes/modules/master_listing.php

add - case 'MASTER_LIST_OPTIONS':

$lc_text = TABLE_HEADING_OPTIONS;

$lc_align = 'align="center"';

break;

 

and add, this is the part that confused me, i couldnt identify slave switch so I stuck it where I think it should be - case 'MASTER_LIST_OPTIONS':

 

$lc_align = 'align="center"';

$lc_text = '';

///////////////////////////////////////////////////////////////////////////

// BOF: attribute options

$opt_count=0;

$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'" . " order by popt.products_options_sort_order");

while ($products_options_name_values = tep_db_fetch_array($products_options_name)) {

$opt_count++;

$products_options_array = array();

$lc_text .= '<b>' . $products_options_name_values['products_options_name'] . '</b><br />' . "\n";

$products_options = 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)$listing['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_values = tep_db_fetch_array($products_options)) {

$products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name'], 'style' => '');

if ($products_options_values['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') ';

}

}

$lc_text .= tep_draw_attrib_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array);

$lc_text .= '<br />';

}

if($opt_count==0) {

$lc_text = MASTER_TEXT_NONE;

}

// EOF: attribute options

///////////////////////////////////////////////////////////////////////////

 

break;

 

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

 

Released under the GNU General Public License

 

*/

 

$listing_split = new splitPageResults($master_sql, MAX_DISPLAY_SEARCH_RESULTS, 'products_master');

 

 

 

if ( ($listing_split->number_of_rows > 0) && ( (MASTER_PREV_NEXT_BAR_LOCATION == '1') || (MASTER_PREV_NEXT_BAR_LOCATION == '3') ) ) {

 

 

?>

 

 

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<?php

}

 

 

 

$list_box_contents = array();

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

switch ($column_list[$col]) {

case 'MASTER_LIST_OPTIONS':

$lc_text = TABLE_HEADING_OPTIONS;

$lc_align = 'align="center"';

break;

case 'MASTER_LIST_MODEL':

$lc_text = TABLE_HEADING_MODEL;

$lc_align = '';

break;

case 'MASTER_LIST_NAME':

$lc_text = TABLE_HEADING_PRODUCTS;

$lc_align = '';

break;

case 'MASTER_LIST_DESCRIPTION':

$lc_text = TABLE_HEADING_DESCRIPTION;

$lc_align = 'center';

break;

case 'MASTER_LIST_ATTRIBUTES':

$lc_text = TABLE_HEADING_ATTRIBUTES;

$lc_align = 'center';

break;

case 'MASTER_LIST_MANUFACTURER':

$lc_text = TABLE_HEADING_MANUFACTURER;

$lc_align = '';

break;

case 'MASTER_LIST_PRICE':

$lc_text = TABLE_HEADING_PRICE;

$lc_align = 'right';

break;

case 'MASTER_LIST_QUANTITY':

$lc_text = TABLE_HEADING_QUANTITY;

$lc_align = 'right';

break;

case 'MASTER_LIST_WEIGHT':

$lc_text = TABLE_HEADING_WEIGHT;

$lc_align = 'right';

break;

case 'MASTER_LIST_IMAGE':

$lc_text = TABLE_HEADING_IMAGE;

$lc_align = 'center';

break;

case 'MASTER_LIST_BUY_NOW':

$lc_text = TABLE_HEADING_BUY_NOW;

$lc_align = 'center';

break;

}

 

if ( ($column_list[$col] != 'MASTER_LIST_BUY_NOW') && ($column_list[$col] != 'MASTER_LIST_IMAGE' && ($column_list[$col] != 'MASTER_LIST_MULTIPLE' && ($column_list[$col] != 'MASTER_LIST_DESCRIPTION'))) ) {

$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

}

 

$list_box_contents[0][] = array('align' => $lc_align,

'params' => 'class="productListing-heading"',

'text' => ' ' . $lc_text . ' ');

}

 

if ($listing_split->number_of_rows > 0) {

$rows = 0;

$master_query = tep_db_query($listing_split->sql_query);

while ($listing = tep_db_fetch_array($master_query)) {

$rows++;

 

if (($rows/2) == floor($rows/2)) {

$list_box_contents[] = array('params' => 'class="productListing-even"');

} else {

$list_box_contents[] = array('params' => 'class="productListing-odd"');

}

 

$cur_row = sizeof($list_box_contents) - 1;

 

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {

$lc_align = '';

$lc_params = '';

 

switch ($column_list[$col]) {

case 'MASTER_LIST_OPTIONS':

 

$lc_align = 'align="center"';

$lc_text = '';

///////////////////////////////////////////////////////////////////////////

// BOF: attribute options

$opt_count=0;

$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'" . " order by popt.products_options_sort_order");

while ($products_options_name_values = tep_db_fetch_array($products_options_name)) {

$opt_count++;

$products_options_array = array();

$lc_text .= '<b>' . $products_options_name_values['products_options_name'] . '</b><br />' . "\n";

$products_options = 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)$listing['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_values = tep_db_fetch_array($products_options)) {

$products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name'], 'style' => '');

if ($products_options_values['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') ';

}

}

$lc_text .= tep_draw_attrib_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array);

$lc_text .= '<br />';

}

if($opt_count==0) {

$lc_text = MASTER_TEXT_NONE;

}

// EOF: attribute options

///////////////////////////////////////////////////////////////////////////

 

break;

case 'MASTER_LIST_MODEL':

$lc_align = '';

$lc_text = ' ' . $listing['products_model'] . ' ';

break;

case 'MASTER_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

$lc_text = ' ' . $listing['products_name'] . '</a> ';

}

break;

case 'MASTER_LIST_DESCRIPTION':

$lc_align = '';

$lc_text = ' ' . osc_trunc_string(strip_tags($listing['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), MASTER_LIST_DESCRIPTION_LENGTH) . ' ';

 

break;

case 'MASTER_LIST_MANUFACTURER':

$lc_align = '';

$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';

break;

case 'MASTER_LIST_PRICE':

$lc_align = 'right';

if (tep_not_null($listing['specials_new_products_price'])) {

$lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';

} else {

$lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';

}

break;

case 'MASTER_LIST_QUANTITY':

$lc_align = 'center';

$lc_text = ' ' . $listing['products_quantity'] . ' ';

break;

case 'MASTER_LIST_WEIGHT':

$lc_align = 'right';

$lc_text = ' ' . $listing['products_weight'] . ' ';

break;

case 'MASTER_LIST_IMAGE':

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

}

break;

 

case 'MASTER_LIST_BUY_NOW':

 

$lc_align = 'center';

$lc_valign = 'top';

if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) {

$lc_text = TEXT_STOCK;

} elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing['products_id']) < 1)) {

$qty_array = array();

for ($i=0; $ns = 20, $i <= $ns; $i++) {

$qty_array[] = array('id' => $i, 'text' => $i);

 

$lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_array) ;

 

}

} else {

$quantity = tep_get_products_stock($listing['products_id']);

$qty_array = array();

for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) {

$qty_array[] = array('id' => $i, 'text' => $i);

 

$lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_array) ;

 

}

}

break;

}

$list_box_contents[$cur_row][] = array('align' => $lc_align,

'valign' => $lc_valign,

'params' => 'class="productListing-data"',

'text' => $lc_text);

}

}

 

new productListingBox($list_box_contents);

} else {

$list_box_contents = array();

 

$list_box_contents[0] = array('params' => 'class="productListing-odd"');

$list_box_contents[0][] = array('params' => 'class="productListing-data"',

'text' => TEXT_NO_PRODUCTS);

 

new productListingBox($list_box_contents);

}

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

</table>

<?php

if ( ($listing_split->number_of_rows > 0) && ((MASTER_PREV_NEXT_BAR_LOCATION == '2') || (MASTER_PREV_NEXT_BAR_LOCATION == '3')) ) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>

<td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>

</tr>

</table>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<?php

}

?>

 

Hope this help see the problem


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites
there anyway to write code so price show up under the master image.

I'm sure there is but I'm not gonna try to write that code... lol

You can have the price appear on the right in line with the master products name.

This puts the price above the image.

You can put the price on the image or add to the canvas size and have the price "below" the image.

 

Did you find the code on this forum for having the master price appear without having ability to buy from it?

Share this post


Link to post
Share on other sites

My appologies. I believe the problem is down to my inablity to type :P

 

Step 7 should be:

INSERT INTO configuration VALUES ('', 'Display Slave Product Options', 'MASTER_LIST_OPTIONS', '2', 'Set to 0 to disable, set to 8 to enable.', 16, 12, now(), '0000-00-00 00:00:00', NULL, NULL);

not:

INSERT INTO configuration VALUES ('', 'Display Slave Product Options', 'MASTER_LIST_OPTION', '2', 'Set to 0 to disable, set to 8 to enable.', 16, 12, now(), '0000-00-00 00:00:00', NULL, NULL);

 

MASTER_LIST_OPTIONS not MASTER_LIST_OPTION

 

Assuming, as I suspect, this is the answer. I'll post a revised solution on the Master Products contrib page.

 

Brian.

Share this post


Link to post
Share on other sites

Ahh great will try now thx for that.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Get this error now maybe after installing the fix above, probably something I have done:

 

1054 - Unknown column 'popt.products_options_sort_order' in 'field list'

 

select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order from products_options popt, products_attributes patrib where patrib.products_id='29' and patrib.options_id = popt.products_options_id and popt.language_id = '1' order by popt.products_options_sort_order


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Get this error now maybe after installing the fix above, probably something I have done:

 

1054 - Unknown column 'popt.products_options_sort_order' in 'field list'

 

select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order from products_options popt, products_attributes patrib where patrib.products_id='29' and patrib.options_id = popt.products_options_id and popt.language_id = '1' order by popt.products_options_sort_order


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Ah. Thought I removed that. Just take out any reference to that field in catalog/includes/modules/master_listing.php (and the order by clause).

Share this post


Link to post
Share on other sites

will do sorting that now report back soon.


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

ahhh great options is in header now but i still get an error :

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites/site38/web/test/includes/functions/database.php on line 99


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

ahhh great options is in header now but i still get an error :

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites/site38/web/test/includes/functions/database.php on line 99


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

I commented out this line in master_listing:

 

//$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_sort_order from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'" . " order by popt.products_options_sort_order");

 

http://www.designedbyelwyn.co.uk/test to see what I mean


Always seeking & Desperate to find a solution!

Share this post


Link to post
Share on other sites

Don't comment out the whole line. Just remove references to popt.products_options_sort_order, so it now becomes:

$products_options_name = 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='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");

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

×