Jump to content
Johnson

Master Products - MS2

Recommended Posts

please ignore the above post. still trying to figure out how to customize things to fit this add-on into my customized product info and product listing.

found the place to look for it.

Edited by Tsimi

Share this post


Link to post
Share on other sites

having an issue here that i am trying to solve.

let's say you have a Master product set and you give it 3 Slaves. The Master product can't be bought so no dropdown to choose amount for master.

the 3 Slaves have prices like this

 

Slave 1 => $10

Slave 2 => $20

Slave 3 => $30

 

Now how can i give the Master product a price like "Price from: $10" (always showing the cheapest price) inside the product_info and product_listing area?

 

Master => Price from: $10

Slave 1 => $10

Slave 2 => $20

Slave 3 => $30

 

I found this

http://addons.oscommerce.com/info/7435

But i have no clue on how to do something like that for this master products add-on. I have to read out the 3 Slaves id and price and make it show the cheapest only.

Anyone ever tried something like this for this add-on?

Edited by Tsimi

Share this post


Link to post
Share on other sites

please ignore the above post. still trying to figure out how to customize things to fit this add-on into my customized product info and product listing.

found the place to look for it.

 

How did you get rid of the "Available quantity" for products that are not master's or slave's? Also, How can you make these fields to type the quantity into.. I thought I saw this somewhere on the forum but this support thread is mangled with users posting 1000's of lines of code which makes it impossible to search.

Share this post


Link to post
Share on other sites

I HAVE THIS but when i select quantitys of slave products but leave master products at 0 it still adds 1 product to the basket how can i stop this? ,

if i leave master product with 0 items and 0 price it shows out of stock warning because somehow it adds 1 product every time i press the cart button

ordinary products are also not obeying the product quantity when adding to cart

i add 10 on a non master non slave product it gives the basket 1

 

is there an fixed version?

Edited by davespice

Share this post


Link to post
Share on other sites

i installed this add-on on a vanilla osc 2.3.3.4 shop. i used the files that came with the latest version from Gergely.

so far everything looks great except one thing. when i browse a product (not master and not slave) and choose lets say 3 from the quantity dropdown then only 1 product is added to the shopping cart and not 3.

IF the product has a master or slave id then everything works just fine. i don't want to use this master slave system for "all" my products so it has to work with master/slave id and without.

 

anyone has a fix for this? where should i look?

 

 

HOW DID YOU FIX THIS ?

I have the same problem

Share this post


Link to post
Share on other sites

i don't remember how i did it :blush: but it was not easy escpecially without support from this topic. :wacko:

I think it had something to do with the drop down selection code. don't really recall.

I don't allow the master product to be purchased, only the slaves can be added to the cart.

Now any normal product and slave can be purchased at any qty.

 

Here is my shop link. (still under construction!)

 

I can show you any file you want but i did some custom coding to it but if it helps i can add the files here in the topic so you can download them and compare to yours using winmerge.

Edited by Tsimi

Share this post


Link to post
Share on other sites

thanks for getting back to me

Gaijin

would like to see product_info.php and application_top.php please to compare with mine please been looking through this for hours my eyes are burning

Share this post


Link to post
Share on other sites

@@davespice

 

Yeah i know that feeling. I remember very well when i was working on this Master Products Add-on.

Really a very nice add-on that doesn't get the attention it would deserve.

I attached also the master_listing.php since that one also includes the qty array code.

Pay particular attention to the qty. arrys in every file and the add-to-cart buttons they are the key.

 

Anyways here the files;

 

 

Edited by Tsimi

Share this post


Link to post
Share on other sites

I'm sure I'm probably missing something very simple - however, after installing the Master Products v2.3 on an osC v2.3.4 site I cannot find how to have a button to add a product to the shopping cart when the product is neither a master or a slave but just a product. Am I missing something?

 

It does exist on index.php with the product listing for the specified category. The slave products also have their add to cart buttons on product_info.php. But products that are not masters or slaves on product_info.php are missing the button to add to cart currently.

 

You can see here on the test site: tcdataweb DOT com/KKTestSite   The kits are just products - not masters or slaves. If you select a kit the resulting product_info.php page has no way to buy it.

 

I do not want the masters to be purchaseable, they are just information holders basically to give the info on the product and then the slaves are the various product sizes. But some products do not need masters and do not need to be slaves, I still need to be able to add those to the cart.  I see others have had this issue, so maybe it isn't that I've done something wrong on install - LOL!  Any thoughts are greatly appreciated :-)

 

 


~Tracy
 

Share this post


Link to post
Share on other sites

Woohoo - found a fix :-)  I had moved my review and add to cart buttons to be in a certain div for design purposes, and they were only functioning for the slaves with where I put them.

 

So - underneath the javascript for piGal is where the description is that goes at the top of the page. I added code under that description to check and see if a product was a master or not and only display the review and buy now buttons for those that were not masters (slaves won't show as a product without being in the slave table so this seems to be working so far)

 

 

<?php echo stripslashes($product_info['products_description']); ?>
<?php
    if (($product_info['products_master'] == 0 ) && ($product_info['products_master_status'] != 0)) {
?>
<br>
<?php
    } else {
?>
    <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
    <?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>
<?php
}
?>

~Tracy
 

Share this post


Link to post
Share on other sites

Hello,

 

i try to install Master Products for 2.3 into a 2.3.1 store.

 

I have a problem with ../includes/modules/products_listing.php

 

It says:

 

On or around line 128/131, change:

 if (isset($HTTP_GET_VARS['manufacturers_id'])  && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            } else {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            }
            break;
          case 'PRODUCT_LIST_BUY_NOW':
            $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';

to

// Master Products
            if (isset($HTTP_GET_VARS['manufacturers_id'])  && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . tep_master_link($listing['products_master_status'], $listing['products_master'], $listing['products_id'])) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            } else {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . tep_master_link($listing['products_master_status'], $listing['products_master'], $listing['products_id'])) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            }
// Master Products EOF
            break;
          case 'PRODUCT_LIST_BUY_NOW':
// Master Products
            if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
              $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            } elseif ($listing['products_master'] != '0') {
              $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . ((strpos(trim(str_replace('_', '', $listing['products_master'])), ' ') !== false) ? (trim(str_replace('_', '', $listing['products_master']))) : ($listing['products_id'])))) . '</td>';
            } else {
              $prod_list_contents .= '        <td align="center">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'])) . '</td>';
            }
// Master Products EOF

but I don't know how to include it because my product_listing.php is little different from the above!

 

my product_listing.php:

           if (isset($HTTP_GET_VARS['manufacturers_id'])  && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            } else {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            }
            break;
          case 'PRODUCT_LIST_BUY_NOW':
             $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';

Please can anyone assist me?

 

THX

Stefan

Edited by stratula

Share this post


Link to post
Share on other sites

Hi Stefan

 

Can you try this once.

if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
} elseif ($listing['products_master'] != '0') {
  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . ((strpos(trim(str_replace('_', '', $listing['products_master'])), ' ') !== false) ? (trim(str_replace('_', '', $listing['products_master']))) : ($listing['products_id'])), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
} else {						  
  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
}

Share this post


Link to post
Share on other sites

Hi Tsimi,

first of all thx for your help.

I don't understand why the part with the manufactures_id is not in your one or is this only the lower part of the changes?

 

 

br

stefan

Share this post


Link to post
Share on other sites

I just posted the lower part. The manufacturers_id part above (which is the products image part) can be replaced as it says in the install manual since your code is same. But your buy now button part is customized, i guess you added a quantity input field and therefore used a different code. That is why i just showed you the lower part. Here is the full code.

// Master Products
            if (isset($HTTP_GET_VARS['manufacturers_id'])  && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . tep_master_link($listing['products_master_status'], $listing['products_master'], $listing['products_id'])) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            } else {
              $prod_list_contents .= '        <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . tep_master_link($listing['products_master_status'], $listing['products_master'], $listing['products_id'])) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>';
            }
// Master Products EOF
            break;
          case 'PRODUCT_LIST_BUY_NOW':
// Master Products
			if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
			  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
			} elseif ($listing['products_master'] != '0') {
			  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . ((strpos(trim(str_replace('_', '', $listing['products_master'])), ' ') !== false) ? (trim(str_replace('_', '', $listing['products_master']))) : ($listing['products_id'])), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
			} else {						  
			  $prod_list_contents .= '        <td align="center">' . tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . '<table cellSpacing="6" cellPadding="0" width="90%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=3 maxlength=3') . '</td><td align="center" width="75%" valign="absmiddle">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart') . '<td align="absmiddle">' . '</td></tr></table></form>';
			}
// Master Products EOF

Keep in mind that the above code is not tested! Just try it once and report back.

Share this post


Link to post
Share on other sites

With Bootstrap

 

Anyone try to install this with Burts Bootstrap version of OSC?

http://forums.oscommerce.com/topic/396152-bootstrap-3-in-2334-responsive-from-the-get-go/

(were actually using his v2.3.4)

Running into a lot of issues. Been trouble shooting since last week. Just wondering if anyone's pulled it off and if you have tips.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself.

Therefore, all progress depends upon the unreasonable man."

-- George Bernard Shaw

Share this post


Link to post
Share on other sites

Hi dear

 

sorry for my bad english...

 

i installed MS2 on my OSC2.3.4 and it works fine.

only three small "problems" are there.

 

first:

if i do a slave in den cart - the master is also in it.

where can these problem be resolved?

 

second:

in the "standard" installation the product pictures are in a slideshow or something else.

now with MS2 are the picutres much bigger and opend in a sencond tab or window.

where can these problem be resolved?

 

third:

if i go this way: master -> slave -> 2pcs in cart  - in the cart are only 1 pcs. This is only out of the slave. If i do in the master 2pcs of slave in the cart - in the cart are 2 pcs.

where can these problem be resolved?

 

I hope you understand my problems...sorry for the english.

 

Dani

Share this post


Link to post
Share on other sites

@@deibelswemmser

 

Hi Dani

 

How did you install your Master Products Add-on?

And which Version of the Add-on did you install?

Did you just replace your files with the files from the package?

If yes then you did a big mistake! There are small differences between 2.3.x and 2.3.4 you can't just replace the files like that.

Try to use tools like Winmerge to compare two files and see where the differences are. Gergely did a great Job marking the code changes with tags like this

//Master Products 

CODE CHANGES 

//Master Products EOF

so they are easier to spot.

 

 

first:

if i do a slave in den cart - the master is also in it.

where can these problem be resolved?

 

This has been solved in the "correct" Version of the Master Products Add-on.

To find here http://addons.oscommerce.com/info/7738

 

You have to download the Master Products for V2.3x V2.1 Version from September 14th 2011 inside the package you will find an upgrade_2.0_to_2.1.txt file do those changes. Then you will be able to set the amount of master products that should be purchased together with the slave. 0 would mean of course none will be added and only the Slave goes to the cart.
 

 

 

second:

in the "standard" installation the product pictures are in a slideshow or something else.

now with MS2 are the picutres much bigger and opend in a sencond tab or window.

where can these problem be resolved?

 

I guess this happens because you just replaced the files from the package. osC 2.3.4 uses the colorbox plugin and not the fancybox plugin anymore. Or you messed up the javascript code for the product images. That is why you should compare the files with Winmerge and not just blindly replace them.

 

 

third:

if i go this way: master -> slave -> 2pcs in cart  - in the cart are only 1 pcs. This is only out of the slave. If i do in the master 2pcs of slave in the cart - in the cart are 2 pcs.

where can these problem be resolved?

 

This seems to be an application_top.php or/and product_info.php issue. You probably have an input box for products qty inside the product_info.php file which is not standard osC 2.3.4. But can't tell for sure though without looking at the files.

 

My advice would be to uninstall your Master Products Add-on from your shop and revert back to as it was before installing and then download the correct add-on version from here http://addons.oscommerce.com/info/7738 (14. Sep. 2011) follow the install manual from Gergely (Master_Products_Guide_V23x_en.html) and then apply the small fix from (1 July 2013) or Winmerge all the files, one by one.

 

You do have a backup of your shop data and database right? You should always take a backup of your shop data and Database before installing "any" add-on just in case something should go wrong.

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@yomama360

 

Aloha!

 

 

With Bootstrap

 

Anyone try to install this with Burts Bootstrap version of OSC?

http://forums.oscomm...rom-the-get-go/

(were actually using his v2.3.4)

Running into a lot of issues. Been trouble shooting since last week. Just wondering if anyone's pulled it off and if you have tips.

 

What issues did you encounter? It shouldn't be too hard to convert the Master Products Add-on to Bootstrap.

Share this post


Link to post
Share on other sites

@@De Dokta

 

Yep that's the one. You and burt are the only ones i know that successfully converted it to BS.

I didn't mention it because;

 

1. yours is made for the German market with all necessary regulations in it.

2. it is a commercial version (burts Version would probably be, don't know about yours)

 

I just can't imagine what issues should arise when converting it to BS. I mean BS is just the visual part the rest like application_top.php or general.php or even the categories.php are more or less same.

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@Tsimi

 

Hi Lambros

 

Yes, you are right - apart from the conversion in BS, there is no big difference to standard Osc. The only (for me) something difficult enhancement was the conversion of the Ajax price update contrib, so that also prices of slaves are automatically updated.when the customer selects options.

And yes, in that form it is commercial. But if I find the time, I will build it up again into an unmodified BS shop - without the gimmicks - and upload to the addon area. :D But for that I need to familiarize myself with the gold version.

 

J.J.

Share this post


Link to post
Share on other sites

Yep that's the one. You and burt are the only ones i know that successfully converted it to BS.

I didn't mention it because;

 

1. yours is made for the German market with all necessary regulations in it.

2. it is a commercial version (burts Version would probably be, don't know about yours)

 

I just can't imagine what issues should arise when converting it to BS. I mean BS is just the visual part the rest like application_top.php or general.php or even the categories.php are more or less same.

 

I do not have a bootstrap version of this addon.  I have used this addon three time to the best of my recollection;

 

1.  a very long time ago, when the addon first came out on a long gone shop.

2.  again some years ago, solved a problem where a shop ALREADY had this installed as well as qpbpp and sppc

 

and in recent times

 

3.  installed on a 2.3(normal) shop

 

Even if I did have a bootstrap version, I would not sell it - as what I do not do is take someone elses addon, update it, change to BS or whatever, then turn around and offer it commercially.  So, please take my name out of any future conversations regarding this addon or any other already made addon from someone else.  Thanks :thumbsup:


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

@@Tsimi

Konnichawa,

 

What issues did you encounter? It shouldn't be too hard to convert the Master Products Add-on to Bootstrap.

 

Thanks for your concern. I am good now. I solicited help in the commercial forums and someone smarter and faster than me got it taken care of.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself.

Therefore, all progress depends upon the unreasonable man."

-- George Bernard Shaw

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

×