Jump to content
Johnson

Master Products - MS2

Recommended Posts

Leave poor Matti alone so he can finish up version 2.0...

I can see why he never has time to work on it, it is a full time job helping everyone fix their installs of 1.1.2 :)

 

I guess with this much attention Matti you can see that your idea for the master products contribution was well needed. I am sure I am not alone in saying we are all very thankful for all your time and hard work on the current version as well as the new version. Which from what I can tell is going to be slicker than Goose S@*!

 

You're the MAN!

Share this post


Link to post
Share on other sites

first of all

VERY NICE MOD

keeps my stock in order :ph34r:

 

how can i make it so the slave product can be linked to the original product_info.php :unsure:

 

regards john

Share this post


Link to post
Share on other sites

Who all here wants to chip in 10 bucks a piece for Matti's time? I use this contribution on my website and it's been very valuable to me. I'm more than willing to send 10 bucks.. maybe we can all send him like 100 bucks or something?

Share this post


Link to post
Share on other sites

Matt,

 

Thanks for the changes, works very nice.. I did however take it one step further since everything shows up regardless of when it was added..

 

I took your code:

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and p.products_master_status = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_master_status = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

and added:

 

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and p.products_master_status = '0' and month(p.products_date_added) = month(now()) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_master_status = '0' and month(p.products_date_added) = month(now()) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

That limits the displayed products to those added in the current month..

 

 

Thanks again

Share this post


Link to post
Share on other sites
first of all

VERY NICE MOD

keeps my stock in order :ph34r:

 

how can i make it so the slave product can be linked to the original product_info.php :unsure:

 

regards john

I take it you mean product_info for the slave? where do you wish to link it from?

 

The slave does currently link to its own page - some do not want this while I am sure others will..... this will be part of the display options for version 2. I think I posted a way to override this, but this is just a temporary hack.

 

There needs to be global options that can override individual product display options (as a time saver), while individual slave product display options will give the flexibility that some will need... perhaps just control of the default settings would be enough.

 

Links back to the Master page from the cart and product_info(slave) are essential... the cart link back has been done twice now I believe in this thread?

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
Leave poor Matti alone so he can finish up version 2.0...

I can see why he never has time to work on it, it is a full time job helping everyone fix their installs of 1.1.2 :)

 

I guess with this much attention Matti you can see that your idea for the master products contribution was well needed. I am sure I am not alone in saying we are all very thankful for all your time and hard work on the current version as well as the new version. Which from what I can tell is going to be slicker than Goose S@*!

 

You're the MAN!

Thankyou - yes, its very encouraging - I am glad I released what I saw as usable as this has been very beneficial both ways. Don't worry too much about the time I spend here - the feedback/solutions all go toward further development :P

 

Good things are always worth waiting for - I have been unexpectedly busy thus far this year, plus a few hiccups to boot :huh: We shall get there.

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
I take it you mean product_info for the slave? where do you wish to link it from?

 

The slave does currently link to its own page - some do not want this while I am sure others will..... this will be part of the display options for version 2. I think I posted a way to override this, but this is just a temporary hack.

 

There needs to be global options that can override individual product display options (as a time saver), while individual slave product display options will give the flexibility that some will need... perhaps just control of the default settings would be enough.

 

Links back to the Master page from the cart and product_info(slave) are essential... the cart link back has been done twice now I believe in this thread?

 

Matti

thanx for your post !!!

i have allready got the shoppingcart thing.

the thing is when i go to the catalog product info and click a master

it will list the slaves, slaves (not hidden) are seperate products to.

it would be nice to be able to click the product in the master llisting to get the rest information (like long text)

 

regards john

Share this post


Link to post
Share on other sites

Hi Matti

 

I have developed a solution which realizes 1:N relations between shop products on basis of your 'Masters Products' contribution. You may now assign a product to as many master products as you wish without any duplication of the original product within the shop catalog.

 

On top of that, you may assign or remove the 'Master Status' on existing products in your catalog at any time you wish. Within the current version of you contribution you can only assign a product to be a 'Master' when creating it as a new product - or you may change the status of an existing product via myphpadmin.

 

There is a 'new' Admin page with handles these features. You may find a screenshot here (currently only in German :( ).

 

I don't know how far your work on Version 2.0 of your Contribution is, but maybe we can 'come together' ...

 

Sebastian

 

 

P.S. sorry for my english - school is a couple of years ago ...

Share this post


Link to post
Share on other sites
Hi Matti

 

I have developed a solution which realizes 1:N relations between shop products on basis of your 'Masters Products' contribution. You may now assign a product to as many master products as you wish without any duplication of the original product within the shop catalog.

 

On top of that, you may assign or remove the 'Master Status' on existing products in your catalog at any time you wish. Within the current version of you contribution you can only assign a product to be a 'Master' when creating it as a new product - or you may change the status of an existing product via myphpadmin.

 

There is a 'new' Admin page with handles these features. You may find a  screenshot here (currently only in German  :( ).

 

I don't know how far your work on Version 2.0 of your Contribution is, but maybe we can 'come together' ...

 

Sebastian

 

 

P.S. sorry for my english - school is a couple of years ago ...

Yes - these relationships are something I have been working on, though I have stuck to the product edit pages as there are display options for them there (Masters have different display options to Slaves, hence the separate edit page) - I want display options to be set per individual product rather than global (there are quick global hacks in this thread) - the product_listing option was the first of these - I wanted at least one before I released so people could see how it is done :D

 

I have also been working on grouping Master/Slaves in the admin listing to make editing product info/viewing relationships a simpler (to me) process - categorised by Master so to speak - this is not a problem for multiple Masters.

 

But, nothing is set in stone - a quick select/add page sounds like a good feature - perhaps we can do a pre-release and then bang heads for version 2 :P

 

I have emailed you so we can collaborate :D

 

Matti

Edited by Johnson

Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
If you want to add the master product at the same time as you add the slaves, you can do so by adding a tep_draw_hidden_field('Qty_ProdId_' . $product_info['products_id'], 1) prior to the </form> in includes/modules/master_listing.php, around line 213:?
 ? ? ? ?<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_hidden_field('Qty_ProdId_' . $product_info['products_id'], 1) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td>

Note:? this change will affect all master products and will add the master every time the Add to Cart button is pressed.

 

Hth,

Matt

This will add the Master to the cart only if it is given a price:

 

<?php
? ?if ($product_info[products_price]>0) { 
?> ? ?	
? ? ? <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_hidden_field('Qty_ProdId_' . $product_info['products_id'], 1) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td>
<?php
} else {
?> ? ? ? ? ? ? ? ? ?
? ? ? ?<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td> 
<?php
}
?>

 

Matti

Edited by Johnson

Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

Thanks for the excellent contribution. Based on what I have read I'm looking forward to v2. One thing I don't recall reading in the previous 30 pages is how the slave item is displayed in the shopping cart. With multiple slave items named simply "size x" it would be helpful if in the cart instead of just displaying the name of the slave item, there was an option to display "(master item name): (slave item name)".

Share this post


Link to post
Share on other sites

has anyone successfully combined master products with price-break1.1?

i am selling clothing and i need the option of giving a quantity break for each product, i believe the combination of these two contributions will do the trick. Any help out there? anyone done this yet? please suggest alternative ways of doing this if you have any ideas.

Share this post


Link to post
Share on other sites

When Master Products is installed on an OSC site with an existing database, are the products already in the database considered by the mod to be master products?

 

Specifically, where I'm going is, to save time and get a jump on getting my database loaded, can I go ahead and load my master products and descriptions with $0 pricing into OSC without the mod while I'm waiting for version 2 and then load the slaves with their attributes after I have version 2 installed?

 

OR

 

Maybe I should install version 1 and load my master products and descriptions with $0 pricing while I'm waiting for version 2 and then load the slaves with their attributes after I have version 2 installed?

 

I'm thinking that it would be better to load the products and info without the MPv.1 mod while waiting on MPv.2 because many of the hacks discussd in this thread will already be incorporated and sorted out in the new version, and so be an easier install.

 

Also, along these lines, I see Beyond Compare recommended a lot in these forums. Personally, I have always used CompareIt! Does anyone have experience with both of these programs, and so, can advise if I should migrate to Beyond Compare? Are they equivalent or are there more features in Beyond Compare?

 

Thanks, and waiting patiently, looking forward to this great mod.

Charles

 

PS: I'm visualizing a host of sexy cheerleaders cheering Matti on wearing those 'black spandex nurses uniforms', not the XXL's, and the 'super nice red bras', in the XXL's, mentioned earlier in this thread. :lol: (Sorry ladies)


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites

Great question Charles. I am in the same boat. I currently have a store running on an old snapshot. I have a new domain and I recently installed MS2. I have been holding off loading my products until the new version came out. But your suggestion as to either installing the products or installing Mpv.1 makes sounds like a great idea.

 

I run an online pool supply business and the weather is heating up....I need to get a move on before I miss out on the season.

 

When it comes to the cheerleaders are we still allowed to say that after the Janet episode? I still can't believe that such a stupid publicity stunt turned our FCC into a bunch of Religious Right Speaker Heads.

 

Anyway sorry for the tangent. I too picture cheerleaders behind Matti, although I picture a bunch of want-a-be computer geeks, like myself, that would not know the first place to start when it comes to building such a kick ass contribution cheering him on.

Share this post


Link to post
Share on other sites

Hi all,

 

I hope I'm not barking up the wrong tree here, but currently I'm using MP to store different representations of the same item in the DB. Each of the books is not easily replaceable due to limited runs, so I can't just arbitrarily hold numerous copies of each =)

 

I.e. Book in mint condition, same titled book (slave) in good condition, same titled book in bad condition.

 

I've hidden the slaves from the main product listing, but this means that if the book in mint is not in stock, I still want to display the master on the product listing so users can click through to view the same title in the other conditions.

 

Uploading this (because of potential store size) is a major bummer, and I'm doing some back-end inventory work to deal with that (which is doing my head in).

 

Am I going about it the right way if I, say set Master quantity = 0, but allow this to be displayed on the product listing page, then let the user choose which product he wants to buy from the product page itself?

 

Is there an option to have the master display (with no quantity) if it knows there are slaves underneath it WITH stock?

 

 

Thanks

Edited by veral

Share this post


Link to post
Share on other sites

Veral

 

As for the master and slaves part of the question, I get the impression from your post that you have made the book in 'mint condition' to be the master and all other quality conditions to be the slaves. I would make the book title and description itself the master and let 'mint condition' be just another slave. For example...

 

Master: Uncle Tom's Cabin - Harriet Beecher Stowe's classic remarkable tale of masters and slaves in the old south. Copyright 1226

Slave: Mint condition

Slave: Good condition

Slave: Poor condition

 

Sorry folks, but, as an extraordinary coincidence, this is the only antiquarian book I personally own. It was my fathers copy, April 1930 (3rd?) printing, and is in only good condition due to his signature and very slight dog-ear of about 10 pages due to prior poor handling. As you will see below, it is also an excellent example of how a product line can challenge this mod.

 

First, to try and answer your questions. If I remember reading this and the 'announcement' threads correctly, I believe that inventory of slaves is already in place (see the first three pages of the 'announcement' thread.) I think that somewhere in the 'support' thread there are patch(es) presented to control the amount of available inventory presented in the dropdown box (you may have 10 copies but can configure MP to show only 3 in the dropdown to avoid the dropdown being too long, however the dropdown will reduce to, say 2, when your inventory goes to 2) Also, I think the patch(es) presented would state "sorry, out of stock" if a particular slave was not available or not show it at all - your option.

 

Also, around page 29 or 30 in 'support', in version 2 there will be the option of having a slave being associated with 'N' masters - something I think you do NOT want in your case, since 'mint condition' of one book would be a different inventory product than 'mint condition' of a different book. I believe all of this will be configurable in Admin so it should not be a problem. What I am not sure on is how this mod would recognize that the 'mint condition' slave for one book is a different slave than the 'mint condition' slave of a different book. Of course, you could always preceed the slave name (book condition) with the initials of the book. For example...

 

Master: Uncle Tom's Cabin - Harriet Beecher Stowe's classic remarkable tale of masters and slaves in the old south.

Slave: UTC Mint condition

Slave: UTCGood condition

Slave UTC Poor condition

 

Master: Uncle Remus Tales - Joel Chandler Harris tells the adventures of a wily rabbit in traditional Old South ethnic lingo.

Slave: URT Mint condition

Slave: URT Good condition

Slave URT Poor condition

 

I have not actually used MP since I necessarily have to wait for the features offered in version 2 for it to be of use to my particular product lines, however, I believe you are correct in setting inventory of the master to '0'. I belive using the master for one of the inventoried options (mint condition) and slaves for the others (good and bad conditions) will result in an inventory problem. On the other hand, if the book is a new release, New York Times Best Seller, then it would be a stand alone product and set the master inventory quantity to whatever your stock level. But, as in your stated case, if the product is an antiquarian book and you have different inventory levels for all three conditions, then set the master to '0' and individually set the inventory level for each slave.

 

Now, to bring up a point of curiosity, I wonder how this mod will actually work for you because of the nature of your products. You may want to list your slaves by country, copyright, and/or printing year first, then condition? Folks, what follows here is not a socio-political comentary but an example of what this poor guy is going through and whether this mod can help him.

 

The original printing of Uncle Tom's Cabin (after it's presentation as a series of magazine articles in 1851) was in 1852. My copy is copyright 1926, 3rd printing (1930). While still respectable in value, it is no where near the value of one of the original 300,000 printed in 1852 or one of the ~40 editions printed in England in the first eight months. By turn of the century over 1.5 million copies had been sold in England alone and it had been translated into more than 40 languages It was second only to the Bible in it's reach into popular thought. Now, copies are classified by 'condition' for resale. Essentially, any combination of factors would basically make each book it's own stand alone (master) product. The benefit of this mod is in, as I have described above, presenting the title, author,and description and/or brief general history of the book. but it looks to me as if each permutation of printing specifics would be a separate slave, which in this case, could be in the hundreds. does anyone have suggestions as to how he could effectively deploy the mod?

 

In this case, you may want to list only the American printings as slaves and if you have, say, a copy of the Italian version, "Il Zio Tom", make a note under the general description of the master saying that "Some european versions are available, please call for availabled printings", depending on the extent of your inventory?

 

Anyone else have any ideas?

 

Good luck,

Charles


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites
Hi all,

 

I hope I'm not barking up the wrong tree here, but currently I'm using MP to store different representations of the same item in the DB. Each of the books is not easily replaceable due to limited runs, so I can't just arbitrarily hold numerous copies of each =)

 

I.e. Book in mint condition, same titled book (slave) in good condition, same titled book in bad condition.

 

I've hidden the slaves from the main product listing, but this means that if the book in mint is not in stock, I still want to display the master on the product listing so users can click through to view the same title in the other conditions.

 

Uploading this (because of potential store size) is a major bummer, and I'm doing some back-end inventory work to deal with that (which is doing my head in).

 

Am I going about it the right way if I, say set Master quantity = 0, but allow this to be displayed on the product listing page, then let the user choose which product he wants to buy from the product page itself?

 

Is there an option to have the master display (with no quantity) if it knows there are slaves underneath it WITH stock?

 

 

Thanks

I believe that works fine, i'm running version 1 and I love it, although my store isn't llive it, it's getting close. Master products can be set to 0 and still display eventhough price is also 0, and i have my slaves hidden as well.

Share this post


Link to post
Share on other sites
Veral

 

Master: Uncle Tom's Cabin - Harriet Beecher Stowe's classic remarkable tale of masters and slaves in the old south.  Copyright 1226

    Slave: Mint condition

    Slave: Good condition

    Slave: Poor condition

 

This would perhaps work, but.... I work with precious gemstones - each a very individual item but which still can be categorised. I don't use anything like Master Products but rather custom attributes which I have coded suitably for the product - these are accessible on the admin->products/categories edit page eg.

 

Grade

Carat Weight

Clarity

Cut

N.E.T. (treatment)

Origin

Size

 

The stones are categorised by stone type->colour->shape.

 

In some cases, this is a far better approach - and keeps programmers fed :P

 

 

What I am not sure on is how this mod would recognize that the 'mint condition' slave for one book is a different slave than the 'mint condition' slave of a different book.

 

Slave Products are actual products and have their own products_id :D

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

Charles,

 

I think that still leaves our questoin....To load v1 or wait for v2? Do you have any more thoughts the subject?

 

--Josh

Share this post


Link to post
Share on other sites

Thanks for the replies all (and for the socio-politic commentary, everything's helpful).

 

I've written a script which reads an inventory file, with conditions and suchlike and uploads it all via Easypopulate currently - the only thing that needs doing is setting master quantities to 0 where no master copies exist, but where slaves exist and displaying (wth the '0' changed to '' or something) - can anyone tell me how this can be done quickly?

 

Sorry to be lazy, but Talon ... you'd seem to be the best person to ask in this instance =)

 

... now all I gotta do is figure out why Paypal IPN emails me 10 sequential copies of the debug info when I buy anything :P

Edited by veral

Share this post


Link to post
Share on other sites

Matti

 

I tried to respond this afternoon but the forum was down.

 

So, if Veral uses identical individual slave names per master, like 'mint condition', my suggestion of including the initials of the master in the slave name would be a good one to keep from getting confused.

 

I can see the overlap of stones and books, except, stones are truly individual, case in point, opal. Absolutely NO stone has the same flash/combination of color, carat weight can vary by .01 (with the right scale :P ), some mines produce less stable rough than others and so the stones may tend to craze over time unless they are put on the roof of the minig shed for a year or two to 'proof' them, etc. and then you have to be sharp enough to do business with dealers like Dag Johnson :lol:. Each stone is truly it's own inventory item.

 

But books, while they get very detailed, can still exist in inventory in multiples, 2 'mint condition', 4 'good condition', and '0' bad condition (if your a wise dealer ;) )

 

Remember my thoughts from page 17?

 

Just to think-tank here (remember my WIKI tirade?), I'm sure there are other features, like allowing slaves of slaves. For what purpose I couldn't guess, but you know people, someone will want it for some reason. Of course that would come full circle and approach the categories structure. But then to be able to place an abbreviated master/slave window (no pricing or options) in one of the side columns , possibly incorporated into the categories box. This would either replace the need for categories or expand the navigation options of the categories box, freeing up dispay space in the middle for yet more product info immediately visible to the customer without more scrolling.

 

It seems to me that slaves of slaves, with attributes, with the ability to set the inventory to '0' for 'parent' slaves might work fairly well for Veral, allowing him to manage his inventory and keep it straight?

 

Oh yes, and what do you think about entering the masters now while I wait for v2?

 

Charles


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites

Veral,

 

I believe those quantities can be set in Admin after the products are loaded. However, I think you should be able to load those quantities at the same time as the products are loaded, possibly by manual adjustment to the text upload file before your script uploads it. Maybe your script can be modified to read the inventory and load that info into a spreadsheet program like Excel, modified by you by adding the appropriate column and loading it with the inventory amounts, and then uploaded by Easypopulate?

 

Charles


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites

This forum's so helpful, it's cool =) Sorry for the spam, but this is what I've done:

 

I've made the amendments to the page so quantities of 0 are displayed as 'avail', and on the product page, set it so that if the master quantity = 0, then it says 'look below for additional'. (I'm paraphrasing).

 

The script works (I think) now. Initially, I assume that I have no products, then run the script which allocates the slave attribute to anythng which is not in mint condition. It then loads up fake masters (if there are no real items in mint cond) which those slaves will be associated with, along with real 'normal' products and 'real masters' (mint condition exists).

 

Easypopulate runs, it allocates product_ids to everything ... then I download a full easypop. tab-separated file with product_ids also. (*pant pant*) - I should automate this.

 

Then I run the script again, it checks to see if there's a recent downloaded file, and sets the prod_master values on the slaves to whatever's recent then reuploads the slaves (slaves have model_id = model_id + condition, and name = name + condition, description = buy this in x condition).

 

I've only done one load (of about 1500 items), but it'll save on labour later I hope!

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

×