Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Instead of hiding slave products from whats new and new products i think a nicer solution could be to actually let them show but point them into the master instead, anyone know the proper code to set this up. This way instead of hiding all slaves from these places users could see them and when they click on them it'll bring them to the master, thus adding new products to old masters will let users know that something new is there.

Link to comment
Share on other sites

This is a fairly hot thread.

 

So is anybody able to answer my question from a few pages back :

Great contribution, but the length of this thread is daunting! Have read a total of 32 pages so far!! Before I go any further can someone please answer a question?

I have a gift hamper site.

My gift hampers may have many items. Each item can be in many hampers. The hampers are for sale and display, the individual items are not (yet). I would like to track the inventory of the items.

If I have hampers as masters and items as slaves - will this contribution allow for the many-to-many relationship? (I read it was probably coming but my reading hasn't yet got to the point where it has been incorporated without doing a copy slave which is problematic for inventory recording).

 

Thanks!! Take care!

Link to comment
Share on other sites

Anyone happen to know what new code is needed for version 1.1.5 to make quantity drop down to an input? I can get it to somewhat work by using

 

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

 

but the input area keeps saying value="28" which is referring to $product_info['products_id']

Edited by talon177
Link to comment
Share on other sites

Was wondering if someone knew how I could code slave hidden files that are showing up in the boxes below to link to the master product instead of the slave product, also master products with prices, and then make master products with price 0 not show up

 

whatsnew box

shopping cart box

specials box

etc...

 

Thanks for the help in advance.

Link to comment
Share on other sites

Anyone happen to know what new code is needed for version 1.1.5 to make quantity drop down to an input? I can get it to somewhat work by using

 

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

 

but the input area keeps saying value="28" which is referring to $product_info['products_id']

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

With a period, not a comma, between the 'Qty_ProdId_' and the $product_info['products_id'], and it needs to have something (a blank string here) entered for the initial value to push the parameters string to the proper place.

 

To make the master show rather than the slave, you could try replacing p.products_id with

IF((p.products_master > 0), p.products_master, p.products_id) as products_id

in the column lists (between select and from) of all the tep_db_query calls. E.g. in whats_new.php:

  if ($random_product = tep_random_select("select IF((p.products_master > 0), p.products_master, p.products_id) as products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

that might produce the effect that you want.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

ecartz: Thanks for the quick fix for input quantity, i'll try the other one next!

 

Also i Just ran into another problem, if you select manufacturer the buy now buttons doesn't work it just shows at the end of the extention products_id= and not products_id=1

Link to comment
Share on other sites

Ok so thanks to ecartz the qty input now works for the master product but not the slave, i'm wondering what do i need to change exactly on input/master_listings.php to make this work

 

From:

 

          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;

 

To: ????

 

 

 

 

 

The code for product_info.php is

 

From:

 

<td align="right" class="main"><?php if ($product_info['products_quantity'] > 0) {
echo TEXT_QUANTITY . '  ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array); 
} elseif ((STOCK_CHECK == 'false')&& ($product_info['products_quantity'] < 1)) {
$qty_array = array();
for ($i=0; $ns = 20, $i <= $ns; $i++) {
$qty_array[] = array('id' => $i, 'text' => $i); 
} 
echo TEXT_QUANTITY . '  ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array);
} else {
echo TEXT_STOCK;
}

 

To:

        <td align="right" class="main"><?php echo TEXT_QUANTITY . '  ' . tep_draw_input_field('Qty_ProdId_' . $product_info['products_id'], '1', 'size="4"');
echo tep_draw_separator('pixel_trans.gif', '30', '10');
?>

 

But now 1 question that just came up is stock quantity since urs can enter any number

Link to comment
Share on other sites

I have read quite a lot on this contrib and tbh, I have confused myself here, I need this contrib I think so I will run this past the people who are using to see if it will work for me.

I can use attributes but hell this would take an age to setup, so here is my idea.

 

I want to sell tubs of livefood for reptiles each tub has athe same base price of 3.50 but I want to give price breaks for 2,3,4,5,6,7 this would be easy in attributes but I also need to offer the customer the option to select type of food, I have 9 options here to make, then I have size of food in tubs these choices are another 5 then I need the option to have multiples per selection, quite complicated.

 

ie

1 tub = 3.50

2 tub = 3.25

3 tub = 3.00

4 tub = 2.75

5 tub = 2.50

6 tub = 2.25

7 tub and more = 2.00

 

Customer order:

2xbrown crickets/medium size

3xBlack Crickets/small size

1xlocusts/adult

 

will cost customers 6 tubs @ 2.25 = 13.50

 

Is this contrib able to do this for me.

I hope I explained proper, thx in advance.

Link to comment
Share on other sites

so there is no difference between the cost of a medium, small or adult tub? I don't think this contrib will count qty. You will have to code that one yourself if there is no contrib already for it.

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

Link to comment
Share on other sites

you are correct, there is no dif in cost between the small medium large adult and so on all I do is reduce the quantity of insects in the tubs.

Link to comment
Share on other sites

This is a fairly hot thread.

 

So is anybody able to answer my question from a few pages back :

Great contribution, but the length of this thread is daunting! Have read a total of 32 pages so far!! Before I go any further can someone please answer a question?

I have a gift hamper site.

My gift hampers may have many items. Each item can be in many hampers. The hampers are for sale and display, the individual items are not (yet). I would like to track the inventory of the items.

If I have hampers as masters and items as slaves - will this contribution allow for the many-to-many relationship? (I read it was probably coming but my reading hasn't yet got to the point where it has been incorporated without doing a copy slave which is problematic for inventory recording).

 

Thanks!! Take care!

Currently no. Each slave can only have one master. To add multiple master/slave relations would require an extra table to link them. Not to mention a fair few code changes.

 

Brian.

Link to comment
Share on other sites

Does anyone have a solution for putting multi master products/slave into different categories? without duplicating the product, because the issue then comes to stock, search results, manufacturer results, specials, product notifications, reviews, etc....

Link to comment
Share on other sites

Does anyone have a solution for putting multi master products/slave into different categories? without duplicating the product, because the issue then comes to stock, search results, manufacturer results, specials, product notifications, reviews, etc....
You can use copy as link (rather than duplicate) on the Master Product, and the slaves will show under the master in both categories.

 

Copy as link on slave products would require a pretty complete rewrite of the slave/master association mechanism.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

Hi, can anyone help me install this. I have a few hacks installed and catagories.php is kind of hacked up. I have had a few members offer to send me a version that works with most common contributions...but one contribution I have is giving me hell. That contribution is one that allows me to select a set shipping price per item. I have yet to come across a catagories.php file that has Master Products MS2 and this shipping contrib installed.

 

If anyone can help pm me and if you have aim, send your name. Any help would be great!

Link to comment
Share on other sites

Does anyone have a solution for putting multi master products/slave into different categories? without duplicating the product, because the issue then comes to stock, search results, manufacturer results, specials, product notifications, reviews, etc....
You can use copy as link (rather than duplicate) on the Master Product, and the slaves will show under the master in both categories.

 

Copy as link on slave products would require a pretty complete rewrite of the slave/master association mechanism.

 

Hth,

Matt

Thanks I gotta try that! So if you copy the master all the slaves inside it should be there as well? Is there any problems associated with this for product notifications, reviews, specials, and what not?

Link to comment
Share on other sites

eCartZ: OMG Your a life saver, woah now I can get rid of all my duplicates and not have to worry !!!!!!

 

THANKS SO MUCH THIS IS SO COOL!!!

 

Now just a quick question, if you do this i noticed your easypopulate use the same model number so in the future if you update by uploading ep file you'll have to copy all the duplicate links over again, but heck this is worth it rather than having double products and searches.

Edited by talon177
Link to comment
Share on other sites

Your Shopping Cart is Empty! indeed...

 

I'm having pretty much the same problem that jodo was having a few days back (May 18th), except that I haven't yet made any hacks to the product listing, shopping cart, or anything else other than create_account.php and account_edit.php.

 

Basically, I can only make a product go into the shopping cart if it's not a slave, it has a price, and I click directly on its Buy Now button. If I use the quantity selector menu on either a master or a slave, and then click Add to Cart, it doesn't go.

 

All my products have nonzero quantities. Masters with $0 price have quantity 1, others have quantities on the order of 10.

 

I tried changing my Stock configuration parameters per Matti's suggestion to jodo, i.e.,

 

Check stock level - false 

Subtract stock -  false 

Allow Checkout -  true

 

but no joy. Same behavior.

 

Actually, I can't understand why these parameter settings should affect the working of the feature, and I *really* don't want to have to set them as shown above, because I want the stock to deplete as orders are made. In my application, each product unit is a seat in a class, and each class has limited enrollment. When the class is fully subscribed, you shouldn't be able to buy a seat in it any more (although in a later rev I'll probably introduce a waitlist feature).

 

Anyone have any suggestions on what I can do to get this working? The master product model is great for my application (masters are the courses, slaves are specific date/time offerings), but it's not particularly useful if you can't get the products into the cart, nor (to me) if the stock won't deplete as the items are bought...

 

Thanks in advance :)

 

Haephestus

Link to comment
Share on other sites

I don't recall exactly what the stock advice to Jodo was - I think perhaps he didn't wish to display 'out of stock - but it works just fine with them set to 'true' :)

 

I would say you have not updated catalog/includes/application_top.php, or, I think for some installations there are solutions posted here if add to cart was still a problem.

 

Matti

Link to comment
Share on other sites

if you do this i noticed your easypopulate use the same model number so in the future if you update by uploading ep file you'll have to copy all the duplicate links over again,
I'm pretty sure that if you have two rows in Easy Populate with the same products_model but different category paths that it creates a linked product automatically. Same deal if you just change a category path in a row, it adds the product to the new category as a link.

 

The issue with duplicate products_model values in an Easy Populate file is that all the rest of the data will get overwritten (product name, description, price, etc.). However, in the case of a link, that's what you want to happen, so it's not a problem.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

I would say you have not updated catalog/includes/application_top.php...

I would say you are right! It took me a while to find it, but once I pasted in the updated logic everything worked just as I had hoped. Thank you!

 

I must say, it seems a bit strange to me that in the 6 months that have passed since this patch was posted, no one has seen fit to add an updated application_top.php to the contribution stack.

 

Would it make sense for someone to do that? If not, why not? If so, should I go ahead and do it? (Am I allowed to do it?) :blink:

 

Thanks again,

 

Haephestus

Link to comment
Share on other sites

HI guys!

 

Can anyone think of why one might not want all products to be either a master or slave? Must be a good reason or two but I'm blankiing on it.

 

I ask because I am installing the all_products contribution and have keyed it to products_master_status =1. This is because the slave products are just clutter at this level. And there is no reason to have the robots index them. (in my case anyway)

 

Here's the little select change to save typing if anyone wants it. [all_products.php]:

$products_query = tep_db_query("SELECT p.products_id, pd.products_name, pc.categories_id, p.products_master_status FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc WHERE p.products_id = pd.products_id AND p.products_id = pc.products_id AND p.products_status = 1 AND p.products_master_status = 1 AND pd.language_id = FLOOR($languages_id) ORDER BY pc.categories_id, pd.products_name");

 

 

joe

Link to comment
Share on other sites

Has anyone any news on the attributes update by Brian? I think about 5-6 pages back he said he had it sorted and would release in about a week or so.

Link to comment
Share on other sites

if you do this i noticed your easypopulate use the same model number so in the future if you update by uploading ep file you'll have to copy all the duplicate links over again,
I'm pretty sure that if you have two rows in Easy Populate with the same products_model but different category paths that it creates a linked product automatically. Same deal if you just change a category path in a row, it adds the product to the new category as a link.

 

The issue with duplicate products_model values in an Easy Populate file is that all the rest of the data will get overwritten (product name, description, price, etc.). However, in the case of a link, that's what you want to happen, so it's not a problem.

 

Hth,

Matt

Thanks ecartz! That actually works.

 

Now a few other questions to finish up Master Products, in previous post we talked about how you could hide master products from being shown on the whats new, new products, categories, manufacturer's etc... but this was in 1.1.2.

 

Now that 1.1.5 is out, I have a new solution that is better but am not sure exactly how to add it into all the codes. Since 1.1.5 can show masters with prices, the hiding contributions from 1.1.2 aren't useful anymore because it would hide these master products with prices. So does anyone happen to know what we could do to code all these areas to show normal products, slave products, and master products that have prices, and to only hide master products when price equals 0.

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