Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

i installed mp v2.1 but I think there is missing one file in the packet:

catalog/includes/modules/boxes/bm_best_sellers.php

 

Thanks for note!

bm_best_sellers.zip

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

i forgot to mention that i'm stucked while merging the file catalog/product_info.php

here are the two files, who can do this?

I'm trying since days without any succes

 

 

Hi,

 

We need to do new module for it. As soon as possible I will do it in extras. The tab page navigation not fix yet.

 

 

Regards

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 3 weeks later...

Let me rephrase the 1st problem I am having.

 

When I go to product_info.php?products_id=xx, I have the text_quantity drop down box and limited to 20. Can I change this drop down box to a input box?

 

Also when I am on the individual product page and enter a number in the drop down box, it will not update the shopping cart. Please help, I really like this contribution.

Link to comment
Share on other sites

Anyone, please!!!

 

 

Hi,

 

maybe reverse this:

 

To use a checkbox in includes/modules/master_listing.php

 

change

 

$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"');

 

to

 

$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '1', false);

 

 

 

but this will not enough. At this moment v2.3.1 version use drop down. Look at Master Products pervious version for osCommerce 2.2 core.

I will do admin switch for it in future.

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

thank you. I don't have a problem if the product is a master or slave. The problem arises when a product that is not assigned as a slave is chosen. The drop down menu limits the customer to only 20. I sell parts for farmers. A few of my products, the customer may order 20, 40 or sometimes as many as 500.

Link to comment
Share on other sites

I am sure with all the great programmers out there, that someone can step up to the plate and figure out how to change the drop down box to a input box.

 

Please someone. This is a wonderful contribution, and this is all that is needed to make it perfect.

Link to comment
Share on other sites

I was wondering if anyone else is having the same problem that I am. I have installed Master Products for V2.3 and I can assign a product as a master, but if I need to edit the product, I am not able to save it. I get redirected to the categories page and the changes are not saved. Attached is my categories.php page.

categories.php

Link to comment
Share on other sites

I was wondering if anyone else is having the same problem that I am. I have installed Master Products for V2.3 and I can assign a product as a master, but if I need to edit the product, I am not able to save it. I get redirected to the categories page and the changes are not saved. Attached is my categories.php page.

 

 

Hi try to close elseif branch:

// BOF: Availability + Warranty
	  if (isset($HTTP_POST_VARS['availability_id_out_of_stock_image']) && tep_not_null($HTTP_POST_VARS['availability_id_out_of_stock_image']) && ($HTTP_POST_VARS['availability_id_out_of_stock_image'] != 'none')) {
	    $sql_data_array['availability_id_out_of_stock_image'] = tep_db_prepare_input($HTTP_POST_VARS['availability_id_out_of_stock_image']);
	  } elseif (isset($HTTP_POST_VARS['availability_id_in_stock_image']) && tep_not_null($HTTP_POST_VARS['availability_id_in_stock_image']) && ($HTTP_POST_VARS['availability_id_in_stock_image'] != 'none')) {
	    $sql_data_array['availability_id_in_stock_image'] = tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock_image']);
	  } elseif (isset($HTTP_POST_VARS['availability_id_in_stock2_image']) && tep_not_null($HTTP_POST_VARS['availability_id_in_stock2_image']) && ($HTTP_POST_VARS['availability_id_in_stock2_image'] != 'none')) {
	    $sql_data_array['availability_id_in_stock2_image'] = tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock2_image']);
	  } elseif (isset($HTTP_POST_VARS['availability_id_in_stock3_image']) && tep_not_null($HTTP_POST_VARS['availability_id_in_stock3_image']) && ($HTTP_POST_VARS['availability_id_in_stock3_image'] != 'none')) {
	    $sql_data_array['availability_id_in_stock3_image'] = tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock3_image']);
	  } elseif (isset($HTTP_POST_VARS['availability_id_in_stock_special_image']) && tep_not_null($HTTP_POST_VARS['availability_id_in_stock_special_image']) && ($HTTP_POST_VARS['availability_id_in_stock_special_image'] != 'none')) {
	    $sql_data_array['availability_id_in_stock_special_image'] = tep_db_prepare_input($HTTP_POST_VARS['availability_id_in_stock_special_image']);
// EOF: Availability

 

add after

 

{

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

try a simple html php mixed code.

 

 <input name="Qty_ProdId_<?php echo $product_info['products_id']; ?>" type="text" size="30" maxlength="30">

 

its all.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Posted 17 February 2004, 17:38

 

In catalog/advanced_search_result.php change:

 

$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 

to:

 

$where_str = " where p.products_status = '1' and p.products_master = '0' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 

This only works if the Master has the search term - a better solution is to have the result return the Master if the search term is found within the Slave - something I shall get around to I am sure.

 

Matti Ressler

-----

 

 

I need to modify the $where_str code so that so that it searches all the slaves products_id and displays the master. Currently is either all slaves or only the masters (p.products_master = 0). Perhaps:

 

$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 

if (isset($HTTP_GET_VARS['products_master_status'] == 0) && (isset($HTTP_GET_VARS ['products_master'] != 0))) {

$where_str .= " or p.products_master = '" . (int)$HTTP_GET_VARS['products_id'] . "'";

}

 

Parse error: syntax error, unexpected T_IS_EQUAL, expecting ',' or ')'

 

I would greatly appreciate your assistance – struggling for a couple of years with this issue.

Link to comment
Share on other sites

I would greatly appreciate your assistance – struggling for a couple of years with this issue.

 

Hi,

 

Could you put here the full query string? (try to use database logging and select the main query string)

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Thank you so much for your reply.

 

$Id: advanced_search_result.php,v 1.72 2003/06/23

 

Advanced_search_results.php is such an odd document. The $select, $from and $where_str statements are separated in portions. I know that the issue lies solely in:

 

$where_str = " where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 

The above displays all slaves – which sometimes are over 20 slaves per master. See Scientiis.com

 

$where_str = " where p.products_status = '1' and p.products_master = '0' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id ";

 

The above displays the master, but does not search the slaves. Searching for a slave model gives " There is no product that matches the search criteria."

 

Maybe if I could adapt somehow the following:

 

// Master Products

$master_prod = tep_db_query("select products_master, products_master_status

from " . TABLE_PRODUCTS . "

where products_id = '" . $products_master['products_id'] . "'");

$master_prod_values = tep_db_fetch_array($master_prod);

 

if (($master_prod_values['products_master_status'] == 0) && ($master_prod_values['products_master'] != 0)) {

$str_selected_values = $master_prod_values['products_master'];

} else {

$str_selected_values = $products_master['products_id'];

}

 

Tried adapting the following, but received errors

 

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

$where_str .= " and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

}

 

There is also this function in /includes/functions/general.php

 

// Master Products

function tep_get_products_master_status($product_id) {

 

$product_query = tep_db_query("select products_master_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");

$product = tep_db_fetch_array($product_query);

 

return $product['products_master_status'];

}

// Master Products EOF

 

By the way, I'm not a programmer.

 

Thank you again.

Link to comment
Share on other sites

Hi,

 

if I understand the question is that search all master products which has slave product with search key. The results contain master products or single products only. The slaves are not listing.

 

 

This process need subqueries.

 

Here is a simple sql code where searching for price in osCommerce v2.3.1 core:

 

SELECT * FROM `products` WHERE products_master_status = '1' and products_id in(SELECT replace(replace(replace(products_master, "_ ", ""), " ", ", "), "_", "") FROM `products` WHERE products_price = '824' and products_master_status = '0')

 

The results give only masters.

 

 

At this model searching for single master products. The master products only single (_ xxxx _) and not multiply (like _ xxxx yyyy fff _)

 

 

The problem is that how can search masters but there are a lot of events.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

try a simple html php mixed code.

 

 <input name="Qty_ProdId_<?php echo $product_info['products_id']; ?>" type="text" size="30" maxlength="30">

 

its all.

I assume this would be in the product_info.php file. Would you suggest I add this in addition to code that is there or replace the dropdown code with this. Sorry to be such a bother.

Link to comment
Share on other sites

Hi,

 

change:

echo TEXT_QUANTITY . '  ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array, MASTER_PRODUCT_DEFAULT_QUANTITY);

 

to:

echo tep_draw_input_field('Qty_ProdId_' . $product_info['products_id'], '0', 'size="4"');

 

look at master_listing.php

	  case 'MASTER_LIST_BUY_NOW':
	    $list_box_contents .= '<td' . (($slave_id == $listing['products_id']) ? ' class="slave" align="center">' : ' align="center">');
	    if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) {
//		    $list_box_contents .= TEXT_STOCK;
		  $list_box_contents .= '<small> use here go-ahead sales enhance</small>';
	    } 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);
		  }
//		   $list_box_contents .= tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"');			 
	   $list_box_contents .= 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);
		  }
//		   $list_box_contents .= tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"');			 
 $list_box_contents .= tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_array);
	 }
	    $list_box_contents .= '</td>';
	   break;

 

where you can switch on simple input field

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 2 weeks later...

Is there a contribution for adding extra fields known to work with Master Products on version 2.3x? I started installing Extra Product Fields for 2.31 v1.1 and upon reaching install steps for admin/ categories.php I think it may be beyond my skill level to merge. If anyone has had success with that contribution and would share the code they ended up with I might be able to sort it out or, I'd appreciate hearing of success with any other contributions.

Link to comment
Share on other sites

Hi,

 

i get stuck.

 

If a customer puts a slave into the shopping cart, the master is added too. I can´t find out how to stop this. If a slave is selected, only the slave should be put into the shopping cart.

 

Has anyone a tip for me?

 

Thanks a lot

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