Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

shopping_cart.php:

 

i want to set slave product as attributes/options for Master Product and the push them to show in an array in shopping cart!

 

ie,

 

MASTER 1

 

- attributes/options 1 x 1 pcs $10

- attributes/options 2 x 1 pcs $10

- attributes/options 3 x 1 pcs $10

- attributes/options 4 x 1 pcs $10

...

- attributes/options 5 x 1 pcs $10

 

 

could you please help me with the code!

 

cheers

Link to comment
Share on other sites

fsk 18 contrieb orginal:

 case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
//FSK 18
if ($listing['products_fsk_18'] == '1') {
$lc_text =  tep_image_button('fsk18.gif', '');
	if (tep_session_is_registered('customer_id')) {
		if ($customer['customers_fsk_18'] == 1) {
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
		}
	}
} else {
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
}
//FSK 18 EOF
		break;

 

orginal master 1.1.5

case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
//Master Products			
		if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
	} elseif ($listing['products_master'] != '0') {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';	  
	} else {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
	}	
//Master Products EOF			
		break;

 

my test:

case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		//Master Products			
		if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
		//FSK 18
if ($listing['products_fsk_18'] == '1') {
$lc_text =  tep_image_button('fsk18.gif', '');
	if (tep_session_is_registered('customer_id')) {
		if ($customer['customers_fsk_18'] == 1) {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';	  
		}
	}
} else {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';	  
}
//FSK 18 EOF
} else {
//FSK 18
if ($listing['products_fsk_18'] == '1') {
$lc_text =  tep_image_button('fsk18.gif', '');
	if (tep_session_is_registered('customer_id')) {
		if ($customer['customers_fsk_18'] == 1) {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
		}
	}
} else {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
}
//FSK 18 EOF
}	
//Master Products EOF  

		break;

 

fsk 18 works, masterproduct works but the normal products works not, i became product ID = 0

 

whats wrong ( i am from germany and my english is bad )

Link to comment
Share on other sites

Hi,

 

I got this message in the Admin:Fatal error: Call to undefined function: tep_get_products_master_status() in /www/p/printerzonen/htdocs/admin/categories.php on line 1553

 

and I dont know what it means... has anybody seen this before.. and can you tell me what it means??? Does it affect anything ???? Any comments will be hepful

Link to comment
Share on other sites

Hi,

 

I got this message in the Admin:Fatal error: Call to undefined function: tep_get_products_master_status() in /www/p/printerzonen/htdocs/admin/categories.php on line 1553

 

and I dont know what it means... has anybody seen this before.. and can you tell me what it means??? Does it affect anything ???? Any comments will be hepful

 

 

It means that you have not installed properly - the function is missing from /admin/includes/functions/general.php :)

Link to comment
Share on other sites

Hello

 

Having a Cache/ Header prob, I Think?

 

Installed Master_products-v1.1.5 , added Master and slave products, working ok except on the web page at the top I am getting:

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ...../catalog/includes/application_top.php:4) in ....catalog/includes/functions/sessions.php on line 67

 

Any Ideas?

 

Thanks

 

I also have easypop and article manager installed.

Link to comment
Share on other sites

Hello

 

Having a Cache/ Header prob, I Think?

 

Installed Master_products-v1.1.5 , added Master and slave products, working ok except on the web page at the top I am getting:

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ...../catalog/includes/application_top.php:4) in ....catalog/includes/functions/sessions.php on line 67

 

Any Ideas?

 

Thanks

 

I also have easypop and article manager installed.

 

 

OK I resolved the problem. I have other contribs installed (Article Manager) so I used a file compare program (WinMerge) to merge the Master Products files into my files.

IN .....catalog/includes/application_top.php, somehow I got some extra empty lines at the top, removed them and GREAT CONTRIB.

I thought I would post this resolution in the hope that it will help.

Sorry for fixing this before anyone got to answer. :thumbsup:

 

Thanks All

Edited by OCTP
Link to comment
Share on other sites

One more thing: When using the admin/categories to create either a Master or Slave product, when I get to the Form Field "Product Image" I click on the Browse button. The default file it opens is mypictures on my machine.

 

Is there a way to change this to open catalog/images on the server as the default?

 

Would be a great help, then I could upload all my pic's to two different folders one for large pic's to use on the Master products and one for small pic's to use on the slaves. I think this would decrease the web page upload time for customers as well as save me time.

 

Thanks for a Contrib that solved my troubles. :thumbsup:

 

OCTP

Edited by OCTP
Link to comment
Share on other sites

Hey there...

 

I have installed MP and it works - but if I add additional masters, the slave does not appear under any of the master product pages. I installed the updates that appear to allow this, and I am able to easily input multiple masters, and it saves them, but once there is more than one master - the slave doesn't work for any of the masters. Is there another update I am not aware of? Or do you have an idea what may cause this?

 

Thank you!!!

 

I have the same problem..

 

I have multiple master products and am trying to assign a slave to multiple masters. The slaves under the first masterproduct i assigned show.. under all the others the slaves don't appear..

 

Help???

 

Thanx

Link to comment
Share on other sites

I have the same problem..

 

I have multiple master products and am trying to assign a slave to multiple masters. The slaves under the first masterproduct i assigned show.. under all the others the slaves don't appear..

 

Help???

 

Thanx

 

Found another strange thing:

 

As i said in the above post the slave items wont show in the next situation:

 

Master A and B have the same slaves assigned..

 

Master A Master B

 

Slave 1 Slave 1

Slave 2 Slave 2

Slave 3 Slave 3

 

But in the following situation it does work:

 

Master A Master B

 

Slave 1 Slave 1

Slave 2 Slave 2

Slave 3 Slave 3

.......... Slave 4

 

Now all the products are showing, including all the slaves that have multiple masters??

 

Can somebody tell me how to correct this in the script? I just need e.g Slaves 1-3 and not a fourth to make it happen..

 

Thanx

Edited by dracbart
Link to comment
Share on other sites

  • 2 weeks later...
daft I know but I've jsut realised that while I've got options showing on my slave listing it doesn't show up in the shopping-cart or beyond. Why??! What's missing?

 

 

You probably have not made the required changes to /includes/application?top.php :)

 

Matti

Link to comment
Share on other sites

I am getting this error message:

 

Fatal error: Call to undefined function: tep_get_products_master_status() in /hermes/web09/b1168/pow.printersonne/htdocs/admin/categories.php on line 1705

 

when i click on a master or slave product, and the right column doesnt open...

 

How can I fix this, or will installing the new version Master Products-MS2 v2.00 fix it?

Link to comment
Share on other sites

i forgot to mention I already did.... I might have not looked in right place.. so could you please tell me where to look

 

 

To fix your error the function must go into /admin/includes/functions/general.php :)

 

Matti

Link to comment
Share on other sites

You probably have not made the required changes to /includes/application?top.php :)

 

Matti

 

Actually what I had done was apply changes to application_top.php as if the option selection had been run through the QTPro pad_whatever option-selection-drawing system when it hadn't. And that's what I'm working on now to update to v2. If you hear a distant explosion to your north-west it'll be me blowing my mind...

Link to comment
Share on other sites

Hi, thanks for contrib, nice one...

I have a question: Is there any chance to add in shopping_cart.php both master product name and slave product name, trying to change this code in shopping_cart.php

 <td class="productListing-data" valign="top"><a href="' .tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prod_link_id) . '"><b>' . $products[$i]['name'] . '</b></a><br>' . $products[$i]['master'];

but only master product id (number) appeared, thanks a lot

Link to comment
Share on other sites

And one more problem was appeared:

 

products can be added into shopping cart only if user have visited 2 or more pages in the shop, if not, for example, user comes from search engine and decide to buy a slave product, this product will not be added, only if he adds a product to cart then click back and then adds product again... so the product will be appeared in the cart

 

 

how to fix this bug, may be this connected with cookies...

Link to comment
Share on other sites

How do you display a dropdown menu to ONLY SHOW slave products for a particular category?

 

echo tep_draw_pull_down_menu('cat_tree', XXXXsomething hereXXXX, $current_category_id);

 

I think it would be there to put some function... if I am right, which function is it?

Link to comment
Share on other sites

Hello

 

When I add slave product to cart, it says it it empty... I've tried many little tweaks in application_top... but without result. I know that if I add a slave product to cart by typing the link manually it works. So the problem should be in product_info.php... or in application_top.php or even in master_listing.php ?

 

I didn't find any solution... please help! :(

 

Plascual

Edited by Plascual
Link to comment
Share on other sites

Hello

 

When I add slave product to cart, it says it it empty... I've tried many little tweaks in application_top... but without result. I know that if I add a slave product to cart by typing the link manually it works. So the problem should be in product_info.php... or in application_top.php or even in master_listing.php ?

 

I didn't find any solution... please help! :(

 

Plascual

 

*Cough* ... I'm really sorry for this, I had separated the form with "add to cart" button from the rest in product_info.php when I re-designed the page.

 

Sorry again, hope it will be of use for anybody anyways.

 

Plascual

Link to comment
Share on other sites

hello

i have 2 problems with the mp-contrib.

i have install osc 2.2 an master product 1.1.5.

 

1. now, when i search products, all are i.o, but at the css-button (basic-design pack 1.7) is no product id, and the link to the cart give an error. have anyone a solution for this problem. i was many hours search in the internet and this topic, but i can't find a solution.

 

2. i want to display at the search result, when a master product was shown, an other button, like in the article-list, "show-all" product an not the button "buy now" (the master ist 0.0 chf and not to buy :rolleyes: )

 

3. sorry my bad english i'm a swiss-guy :huh:

 

thanks for an answer.

greetings from swiss :thumbsup:

gs

Link to comment
Share on other sites

hello

i have 2 problems with the mp-contrib.

i have install osc 2.2 an master product 1.1.5.

 

1. now, when i search products, all are i.o, but at the css-button (basic-design pack 1.7) is no product id, and the link to the cart give an error. have anyone a solution for this problem. i was many hours search in the internet and this topic, but i can't find a solution.

 

2. i want to display at the search result, when a master product was shown, an other button, like in the article-list, "show-all" product an not the button "buy now" (the master ist 0.0 chf and not to buy :rolleyes: )

 

3. sorry my bad english i'm a swiss-guy :huh:

 

thanks for an answer.

greetings from swiss :thumbsup:

gs

 

Hello jaba321!

 

I will try to answer your questions :)

 

1. I do not know Basic-design pack 1.7, but this error should be in product_listing.php ... Look at the code I pasted in question 2 and compare it to yours. Is there missing $listing['products_id'] in the link?

 

2. In fact, you would like to redirect the search results to product_info.php when the master's price is 0 ? So if you installed Master Products you should have this piece of code in /web/includes/modules/product_listing.php ...

 

		  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';


/* MASTER PRODUCT REPLACE			$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?'; */

//Master Products			
		if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?';
	} elseif ($listing['products_master'] != '0') {
		$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';	   
	} else {
		$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?';
	}	
//Master Products EOF		

		break;

 

Then you have to change the red portion of this code to suit your needs:

 

} elseif ($listing['products_master'] != '0') {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

You could create another button "button_show_all.gif" and place it in /catalog/includes/languages/**your_languages**/images/buttons/

 

Finally go in /catalog/includes/languages/**your_languages**/product_info.php and define a label for it, like IMAGE_BUTTON_SHOW_ALL...

 

3. Don't worry, the idea is to communicate concepts. I'm french myself. :lol:

 

Greetings from Qu?bec/Canada! :thumbsup:

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