Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Thank you very much. This is an AWESOME contribution.

CONGRATULATIONS for the beautiful mind(s) behind it.

 

SUPER NICE QUESTIONS (3) for who has an answer:

 

1.

There are 20 slave products each month (meals) - to preorder (they change each month)

There are 20 masters - 20 working days

 

 

How can we list all 20 slaves in each master? :unsure:

Translation: IF product is master LIST all slaves in db(for that month)

 

August 1 - master

- Soup - slave

- lasagna - slave

- chicken - slave

...

...

...

 

August 2 - master

- Soup - slave

- lasagna - slave

- chicken - slave

...

...

...

 

 

2.

How can we check the total no of meals ordered for 1 day? :o

Client should not be able to add to cart if total no of meals is <4 or >12.

 

3.

How can we automatically add a hidden field :ph34r: to each slave so we know for what day it is ordered?

 

Thank you very much

Xen

Link to comment
Share on other sites

xplorer4d,

You can change the quantity fields quite easily.

 

In /includes/modules/master_listing.php find:

 

<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>

 

to

 

<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>

Edited by Colin
Link to comment
Share on other sites

I have a question about how to do something. I need multiple master products modules running on my system. How would I modify the master_listing.php file to check which category the product is in (ie. Wheels which is 12, Suspension which is 14, etc).

 

The reason I need to do this is the fields for the Wheels show up correctly only in the wheels category. In the Brakes category the fields for the wheels show up. :lol: Obviously, that's not right :)

 

Once it knows the category (say 12) it would display one version of master_listing.php and if the category is 14, it would display another. I know that's not the 'best' solution, but a complete rewrite of the master products contribution is totally out of my league.

 

Is this possible?

Thanks in advance,

Colin

Edited by Colin
Link to comment
Share on other sites

Quick note:

Just happened to notice thanks to a friend that if you have slave products with qty drop down box and all inputs = 0, add to cart shouldn't be clickable and should popup or give a msg saying no products have been added yet or something like that. Currently if you click on the add to cart it brings you to the shopping cart page and says your shopping cart is empty.

 

Anyone know a quick fix?

Link to comment
Share on other sites

Integrating Master Products with Basic Template Structure v1.3

 

Hi,

 

I am running osComm with Basic Template Structure v1.3, and i have changed my basic template somewhat, but not a great deal.

 

When i tried to view the site after extracting the MP files and inserting the .sql code in to my database, i got an error reporting;

 

Warning: main(DIR_WS_BOX_TEMPLATESTEMPLATENAME_BOX): failed to open stream: No such file or directory in c:\inetpub\wwwroot\catalog\includes\boxes\categories.php on line 137

 

Fatal error: main(): Failed opening required 'DIR_WS_BOX_TEMPLATESTEMPLATENAME_BOX' (include_path='.;c:\php4\pear') in c:\inetpub\wwwroot\catalog\includes\boxes\categories.php on line 137

 

Now, I am not a PHP bod by a long way, but it seems that the new php code used by MP isnt setup to work with BTS, which is understandable.

 

Can I get MP to work within the context of my BTS managed new template?

 

Olly

Link to comment
Share on other sites

Integrating Master Products with Basic Template Structure v1.3

 

Hi,

 

I am running osComm with Basic Template Structure v1.3, and i have changed my basic template somewhat, but not a great deal.

 

When i tried to view the site after extracting the MP files and inserting the .sql code in to my database, i got an error reporting;

 

Warning: main(DIR_WS_BOX_TEMPLATESTEMPLATENAME_BOX): failed to open stream: No such file or directory in c:\inetpub\wwwroot\catalog\includes\boxes\categories.php on line 137

 

Fatal error: main(): Failed opening required 'DIR_WS_BOX_TEMPLATESTEMPLATENAME_BOX' (include_path='.;c:\php4\pear') in c:\inetpub\wwwroot\catalog\includes\boxes\categories.php on line 137

 

Now, I am not a PHP bod by a long way, but it seems that the new php code used by MP isnt setup to work with BTS, which is understandable.

 

Can I get MP to work within the context of my BTS managed new template?

 

Olly

This is a problem with your BTS installation both 'DIR_WS_BOX_TEMPLATES' and 'TEMPLATENAME_BOX' are not defined - look in the installation docs for BTS.

 

Matti

Link to comment
Share on other sites

Hey folks... I?m hoping someone here can help me or point me in the right direction. I've been combing through the nearly 90 and growing pages of this thread and not found exactly what I need - though some hacks that are similar.

 

Here's what I need. From any point in the store (search, index, etc.) clicking on a slave item brings you to the product_info for the corresponding master. Matti gave direction on how to accomplish this here: http://www.oscommerce.com/forums/index.php?sho...ic=67284&st=270

 

This works perfect, except one large problem, when as slave is added to the shopping cart - it doesn't add the slave - but adds the master (kinda takes away the point of using slaves to begin with).

 

So I need this to work while excluding the link for 'add to cart'. I realize that this thread is filled with peeps asking for help in this and that to 'personalize' master products to their store ... but I think I?m close to getting this to work right... so if someone could point me in the right direction I would be immensely grateful!

Link to comment
Share on other sites

Hello all,

 

I have the contrubution ultrapics. It is interfering with eh installation of master products. Does anyone have a solution or have the two of these mods? Do i have to hire a programmer, is it going to be possible to workaround?

Any help is appreciated.

 

Thanks,

Danny

Link to comment
Share on other sites

Hey all ..

 

I have the 1.1.5 files installed exactly on my OSC installation, but when I go to update my cart with a slave item, it doesn't appear, and my cart remains empty.

 

I read something about a "logic update" to the application_top.php file .. do I need to use this? Where can I find this patch?

 

Thanks in advance ..

asm

Link to comment
Share on other sites

In includes/application_top.php

 

REPLACE

 

      //Master Products                         
     // customer adds multiple products from the master_listing page

     case 'add_slave' :    
                             while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { 

                                if (substr($key,0,11) == "Qty_ProdId_") { 

                                $prodId = substr($key,11); 

                                $qty = $val; 

                                if ($qty <= 0 ) continue; 


                                $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($qty), $HTTP_POST_VARS['id']);


                               } 
                             } 
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

                             break; 
     //Master Products EOF                                                    

 

WITH:

 

//Master Products  ENDLICH ?BERHOLT!! Ren? Reineke 06.12.03                       
    // customer adds multiple products from the master_listing page
    case 'add_slave' :    
                            foreach ($HTTP_POST_VARS as $keyA => $valueA) {
                               if (substr($keyA,0,11) == "Qty_ProdId_") { 
                               $prodId = substr($keyA,11); 
                               if ($valueA <= 0 ) continue; 
                               $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($valueA), $HTTP_POST_VARS['id']);
                              } 
                            }
                            tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                            break; 
    //Master Products EOF      

Here seems to be my answer .. thanks anyway.

Link to comment
Share on other sites

Hi, i am sorry, i dont know if this is allowd in this forum but i will add it here:

 

I will Paypal immediatetly to someone who can fix up my site, I am stucked using the Master Product contrib for a little modification for a perfume store.

 

Basically I need to follow the same model as Sephora.com

 

Slave product 1 [1 ] ADD TO CART

Slave product 2 [1 ] ADD TO CART

Slave product 3 [1 ] ADD TO CART

 

 

What i need is the customer to be able to click in any of the 3 slave products and just add 1 item of that specific slave product to his car.

 

Meaning, if he doesnt touch anything and just uses the default value, and clicks for example in the slave producr 2, he will simply add 1 item of slave product 2.

 

What is happening in my site is that if they click on 1, 2 or 3... they still get added 1 of each...

 

The site is http://www.miamifreezone.com/store click on perfumes, then on master perfume

 

Can someone help me? is urgent and thats why i am offering $. Thank you

Edited by netgene
Link to comment
Share on other sites

it's adding them both since they both have a quantity as one as a default. If you *have* to have one instead of 0 for the default quantity to will have to change around application top so that it looks for the value of the submit button and not qty.

 

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

I have installed both Master Products and the attributes addon.

I have the following problem:

 

When using the product_info.php as provided with the contribution the menu does not always appear.... see below..

 

 

-Non- Master products with attributes are missing the quantity menu and if you try to add a product non are added. (quantity must be set to ?0?)

 

-Master products with attributes are also missing the quantity menu and if you try to add a product non are added. (quantity must be set to ?0?)

 

-Master products with slaves and attributes works well.

 

-Slave products shown on there own are missing the quantity menu and if you try to add a product non are added. (quantity must be set to ?0?)

 

-Non-Master products without attributes works well (with a quantity menu).

 

 

Any help fixing these problems will be much appreciated.

Link to comment
Share on other sites

Hi, I've tried searching for an answer to this but apparently no one else has has this problem...oops! :unsure:

 

Here's what's happening...Even if I select the slave products to be hidden, they still show in the product listing so it's kind of defeating the purpose of the whole thing.

 

Can anyone help? Or at least point me in the right direction as to which file and which code I messed up?

 

Also, when I try to duplicate a product it gives an error: 1136 - Column count doesn't match value count at row 1

This doesn't bother me so much as I can get around it but it's slightly annoying.

 

Thanks!

Edited by peachie
Link to comment
Share on other sites

Hi, Colin thanks for the comment. :)

 

 

Ryan, thanks for the hint... i am tweaking that section, but i am getting really strange things.. At least now I am just getting one product, but 2 qty of each...

 

Do you think you can help me a little bit more?

 

Thank you.

Link to comment
Share on other sites

Hi, I've tried searching for an answer to this but apparently no one else has has this problem...oops! :unsure:

 

Here's what's happening...Even if I select the slave products to be hidden, they still show in the product listing so it's kind of defeating the purpose of the whole thing.

 

Can anyone help? Or at least point me in the right direction as to which file and which code I messed up?

 

Also, when I try to duplicate a product it gives an error: 1136 - Column count doesn't match value count at row 1

This doesn't bother me so much as I can get around it but it's slightly annoying.

 

Thanks!

Yes... you have to change the SQL query to check for master_status. That fix is displayed back in the first twenty pages or so.4

Link to comment
Share on other sites

colin - why do you have to have a 1 in the quantity box? If not, that would solve your problem easy. Otherwise, I don't really know how to fix application_top for yeah.

 

Ryan

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

( I guess this message was addresed to me? )

 

I first need to have Input text, instead of Drop downs... is much more Easy for very novice internet users to use a input text instead of a drop down.

 

Second, If i put 0, most people will eventually try to click directly on the place in basket, withour realizing they first need to change the quantities, so they will get frustrated and leave. ( Not all, but i am trying to minimize all posibilities )

 

So.. thats why..

 

Plus, all the perfume websites ive seen uses this same model..

 

Thanks.

 

Again all help i can get would be apreciated. Thanks

Link to comment
Share on other sites

hey ryanf,

I'm not having any problems (thank God). The contribution works exactly as prescribed :)

 

What I'm trying to do, though, is figure out a way to allow different master_listing files for different categories. I run an auto parts business and need to have different fields for wheels and brakes.

 

I have like no idea how to do that, lol. At first I thought maybe if the cpath variable was passed to product_info.php. That wouldn't work, though. I am using BTS so I also tried changing the header images to point to different versions of product_info.php so I could then call a different master products. That didn't work.

 

I'm thinking maybe that I need to add some code that will check what category the product resides in. The code would have to be 'in' product_info.php. Once the category is known, I can then do an if/then/else statement and choose the master products module for that certain category. I'd just hardcode the categories as they don't change much.

 

Any idea how I'd find out how to get the cpath from the product_id on the product_info page?

thanks,

Colin

Link to comment
Share on other sites

Dear all,

 

After spending hours looking through this enormous thread I have finally decided that what I'm looking for may not exist. If anyone can tell me whether the following is possible I would be most grateful.

 

When all the slaves of a particular master are sold out I would like to stop the product being displayed in the product listings. Unfortunately, when a slave is purchased the quantity of the master is not reduced and therefore it doesn't disappear when all the slaves do. I know that a message is displayed saying there are no products available but ideally the client would not have to click through to the second screen to find this out.

 

I see two possible solutions. neither of which I am qualified to put into practice:

1. Devise a way so that the master product stock levels are reduced by one when the slave levels are reduced.

or

2. Add code into index.php that checks the stock level of all of the masters' slaves and only displays it in the product listings if the sum of these is greater than zero. It already checks against things such as product listing status at around line 200 so I guess this might be the more straight forward of the two.

 

Of course there is almost certainly a third possibility - That I have missed something incredibly obvious. I am hoping this is the case and there is an easy solution just waiting to be revealed.

 

Many thanks for any help offered.

 

Evan

 

ps if this query makes no sense, sorry. I've been in the house stuck at this computer far too long!!

Link to comment
Share on other sites

Whoops, sorry, got the names crossed up. Colin down where it calls master listing:

<td>
<?php ?include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTS); 
?></td>

Change it to:

<td><?php ?
?if ($cPath == x) {
? ?include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTSX); 
?} elseif ($cPath == y ) {
? ?include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTSY); 
?} else {
? ?include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTS); 
?}
?>
</td>

You'll have to remember to put FILENAME_MASTER_PRODUCTS1, 2, & 3 (or however many you have) in includes/filenames.php. application_top.php gathers the $cPath so you don't have to worry about getting that.

 

Goodluck,

 

Ryan

Edited by ryanf

If I was crafty, this would be a funny signature.

Link to comment
Share on other sites

In Admin->Slave Products which column do I have to activate to make the dropdown menus appear alongside the slave products?

 

I think something may be wrong here...

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