Jump to content
Johnson

Master Products - MS2

Recommended Posts

Hi,

 

I have installed this and it works great.

 

I'm hoping that someone can help me a little bit here.

 

I uses the Seperate Pricing Per Customer contribution http://www.oscommerce.com/community/contri...ng+Per+Customer

 

And this also works great, but the only problem i have with this two is that the prices in the slave_listing.php doesn't show other than the retail price and not the price for the customer group.

 

I have tried to include the database and the group to make the price differient, but then i only get an longer list with the same products over and over again (4 times)

 

I hope that someone out there can help we with this one.

 

Regards

Thomas

 

 

Does anybody have an solution for this?

I have tried over and over again but no luck, driving me mad :(

 

Hope somebody has an answer to this.

 

Best Regards

Thomas

Share this post


Link to post
Share on other sites
Does anybody have an solution for this?

I have tried over and over again but no luck, driving me mad :(

RobinsonDixon posted the master_listing combined for SPPC and price breaks. Actually, the changes for SPPC alone are very similar to those in modules/product_listing.php in SPPC.

Share this post


Link to post
Share on other sites
RobinsonDixon posted the master_listing combined for SPPC and price breaks. Actually, the changes for SPPC alone are very similar to those in modules/product_listing.php in SPPC.

Hi JanZ,

 

I got SPPC and Master Products working together after much frustation and with the help of this forum and you. I want to help others who are trying to do this but I'm not much of a programmer. I saved a folder with the files I modified to merge SPPC and MP and I thought I could make those files available to others, maybe as a contribution. But these files were already fairly heavily modified for my site when I added MP.

 

What I'm getting at is, can you or someone take my files, remove my customizations, and convert them to a more plain vanilla example of how to merge these two contribs? That way others can benefit from it. I don't think I can backtrack it like that.

Share this post


Link to post
Share on other sites

Hi all,

 

I've tried to go through this to determine an answer to my question...

 

I have a problem where my slave attributes are displaying with a different option selected on each drop down.

 

For example, I have 5 slaves to one master.

 

The first master drop down reads:

White

Red

Green

 

The second reads

Red

White

Green

 

The third reads

Green

White

Red

 

I saw a patch listed on the contribution- but to no help.

 

I placed the code:

 

Replace the current query in master_listing.php under // BOF: attribute options and $opt_count=0; to

 

$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' ORDER by products_options_id");

 

But---- this didn't work.

 

Can anyone provide any help? You dont know how greatly I would appreciate.

 

Thanks!

Share this post


Link to post
Share on other sites

Hello guys, this is a great contrib. Only thing is in my product_info and shopping_cart pages I am using STS and just displaying the $content is there anything else i need to show like a certain variable available in STS on any of those pages to get these accessories to show up? Thanks alot!

Share this post


Link to post
Share on other sites
Hello guys, this is a great contrib. Only thing is in my product_info and shopping_cart pages I am using STS and just displaying the $content is there anything else i need to show like a certain variable available in STS on any of those pages to get these accessories to show up? Thanks alot!

 

No exactly how i am doing it however be aware that if you are using tables for product_info, there is a known issue, which I cant find a fix for. Basically it will knacker the layout up pushing the tables all over.


Hey its free!

Share this post


Link to post
Share on other sites
Hi all,

 

I've tried to go through this to determine an answer to my question...

 

I have a problem where my slave attributes are displaying with a different option selected on each drop down.

 

For example, I have 5 slaves to one master.

 

The first master drop down reads:

White

Red

Green

 

The second reads

Red

White

Green

 

The third reads

Green

White

Red

 

I saw a patch listed on the contribution- but to no help.

 

I placed the code:

 

Replace the current query in master_listing.php under // BOF: attribute options and $opt_count=0; to

 

$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' ORDER by products_options_id");

 

But---- this didn't work.

 

Can anyone provide any help? You dont know how greatly I would appreciate.

 

Thanks!

 

Only reason i can think why options are displayed in different order is that they might be multiple entries. Just a hunch. Try replacing the order by clause with this:

 ORDER BY popt.products_options_name

 

This will ensure that they are always listed by name in acending order if u want them other way around than add DESC in the end. Hope this works

Share this post


Link to post
Share on other sites

I have 2 slaves linked to 1 master. I cannot seem to purchase just 1 slave. Here are two methods I am trying with no luck whatsoever.

 

Method 1:

If I manually try to add a slave through "product_info.php?product_id=slaveid&action=add_slave" it seems to just result in an empty cart. I imagine that his SHOULD work, any ideas here?

 

Method 2:

 

This code seems to purchase the master and that adds both the slaves to the cart.

 

tep_draw_hidden_field('products_id', $listing['products_id']) .

tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

$lc_text .= '<br><br><input type="hidden" name="products_id" value="100"><input type="image" src="../shop/images/purchase_item.gif" ';

 

(the value of 100 is in fact the slave product Id)

 

Any ideas/help would be greatly appreciated!

Share this post


Link to post
Share on other sites
Method 1:

If I manually try to add a slave through "product_info.php?product_id=slaveid&action=add_slave" it seems to just result in an empty cart.  I imagine that his SHOULD work, any ideas here?

If you look at the code in application_top.php you will see why this doesn't work:

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

It is looking for the GET variable add_slave, but for the POST variable Qty_ProdId_### (where ### is the products_id) for the products_id and number to add to the card.

 

Method 2:

 

This code seems to purchase the master and that adds both the slaves to the cart.

Again this won't work, but why it adds both slaves to the cart... no clue.

Share this post


Link to post
Share on other sites

so what would the link require then to add an individual slave to the cart?

 

If you look at the code in application_top.php you will see why this doesn't work:

It is looking for the GET variable add_slave, but for the POST variable Qty_ProdId_### (where ### is the products_id) for the products_id and number to add to the card.

Share this post


Link to post
Share on other sites

I just installed the master products v1.5 but the following error is showing up on my index.php page and under my admin here: admin/categories.php . Also my right column of my store is not showing up anymore:

 

1054 - Unknown column 'p.products_listing_status' in 'where clause'

 

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 products p left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' order by p.products_date_added desc limit 3

 

[TEP STOP]

 

There are no other contributions I have installed that would be interfering with this one.

 

Please tell me what I did wrong or what I need to do to fix this error and get master products to work.

Edited by timbuck2

Share this post


Link to post
Share on other sites
I just installed the master products v1.5 but the following error is showing up on my index.php page and under my admin here: admin/categories.php . Also my right column of my store is not showing up anymore:

 

1054 - Unknown column 'p.products_listing_status' in 'where clause'

 

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 products p left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' order by p.products_date_added desc limit 3

 

[TEP STOP]

 

There are no other contributions I have installed that would be interfering with this one.

 

Please tell me what I did wrong or what I need to do to fix this error and get master products to work.

 

I have fixed the problem. I had 2 oscommerce databases in my phpadmin, and I installed the .sql file to the inactive database. I installed it to the active database and everything works now.

Share this post


Link to post
Share on other sites

I want to get an image button to change the value of a quantity box on the fly (under master_listing.php).

 

Current code:

 

*Note: this is the default *Form* for oscommerce.
<form name="buy_now_" method="post" action="http://127.0.0.1/shop/product_info.php?products_id=29&action=add_slave&osCsid=bda5cdffb3966a2dd814f16b3d435cdf"><input type="hidden" name="osCsid" value="bda5cdffb3966a2dd814f16b3d435cdf" />

$lc_text .='<script LANGUAGE="JavaScript">
function writeText (form) {
form.qty_prodid_101.value = "1"
}
</SCRIPT>';

*Note: Products_Id here is equal to 101

$lc_text = 'Quantity:' . tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"');

$lc_text .='<INPUT TYPE="image" SRC="../shop/images/purchase_item.gif" NAME="button" onClick="writeText(this.form)">';

 

The Goal of this is that when the image is clicked it changes the quantity to 1 which in effect purchases just that individual slave. (there is another slave underneath with a quantity of 0 as well)

Share this post


Link to post
Share on other sites

I'm very new to osCommerce so please bare with me

 

I have added this contribution to my new install of osCommerce but I have no idea where and how to set up the master and slaves.

 

Is there a thread on how to configure this in osCommerce?


"If it looks good, you'll see it. If it sounds good, you'll hear it. If it's marketed right, you'll buy it. But...if it's REAL...you'll feel it."

 

Share this post


Link to post
Share on other sites
I'm very new to osCommerce so please bare with me

 

I have added this contribution to my new install of osCommerce but I have no idea where and how to set up the master and slaves.

 

Is there a thread on how to configure this in osCommerce?

If you have installed all the bits then all you need to do is go to Admin/Contemts. There you will see Add Master Product. Complete the dialogue and then insert this into the catlogue. To add a slave to that Master choose add new product and in the dialogue you will be able to add this as a slave to the previous item and so on

 

Steve

Edited by Sierrab

Share this post


Link to post
Share on other sites

I tried to post this question but for some reason can't find my post so I'm apoligize if I double posted by mistake

 

My first question was where and how do I use master products to add the master and slaves, since then I figured out it is in the catalog section of the admin, I see where it says set as master but I don't see anything about slaves. Can someone tell me how to set up as a slave

 

 

Also I plan to add the option of having 2 or 3 columns, with the master Products contribution work with the combonation of the multiple columns

 

Thanks in advance


"If it looks good, you'll see it. If it sounds good, you'll hear it. If it's marketed right, you'll buy it. But...if it's REAL...you'll feel it."

 

Share this post


Link to post
Share on other sites
If you have installed all the bits then all you need to do is go to Admin/Contemts. There you will see Add Master Product. Complete the dialogue and then insert this into the catlogue. To add a slave to that Master choose add new product and in the dialogue you will be able to add this as a slave to the previous item and so on

 

Steve

Thank you very much

 

I got lost in this forum and double posted the smae question in different forums, I apoligize for the mistake. I now know this is the right place to ask questions about this subject

 

 

 

Also I plan to add the option of having 2 or 3 columns, with the master Products contribution work with the combonation of the multiple columns

 

Thanks in advance


"If it looks good, you'll see it. If it sounds good, you'll hear it. If it's marketed right, you'll buy it. But...if it's REAL...you'll feel it."

 

Share this post


Link to post
Share on other sites
Thank you very much

 

I got lost in this forum and double posted the smae question in different forums, I apoligize for the mistake. I now know this is the right place to ask questions about this subject

Also I plan to add the option of having 2 or 3 columns, with the master Products contribution work with the combonation of the multiple columns

 

Thanks in advance

 

 

nobody answered my question yet

:(


"If it looks good, you'll see it. If it sounds good, you'll hear it. If it's marketed right, you'll buy it. But...if it's REAL...you'll feel it."

 

Share this post


Link to post
Share on other sites
nobody answered my question yet

:(

If it's about slaves, then it'll be right above the checkbox for master where you select which master you want your product slaved to.

Share this post


Link to post
Share on other sites

Also I plan to add the option of having 2 or 3 columns, with the master Products contribution work with the combriution of the multiple columns

 

Thanks in advance


"If it looks good, you'll see it. If it sounds good, you'll hear it. If it's marketed right, you'll buy it. But...if it's REAL...you'll feel it."

 

Share this post


Link to post
Share on other sites

Hello once again!!!

 

I have an interesting problem. I hope someone can help. I changed a regular product (with the ID#88) to be a master product and added slaves. When I checked it in the store, I also have 2 extra slaves. So, I went to take a look--thinking maybe I put in #88 on these 2 slaves.... but the number there was #188. I took it off, and they went off the master product #88. I put 188 back on the slave, and it returns on #88!!!

It is also still changing on product ID#188 at the same time.

 

For some reason, the slave does not reconize the difference between 188 and 88. Since I have +300 products (Slaves, Masters, Regulars) this is not a good situation.

 

Can anyone point me in the right direction for getting this issue resolved?

 

Thank you.

tracy :)

Share this post


Link to post
Share on other sites

Can you put the slave products in a dropdown menu istead of quantity ??

 

 

I have 20 diferent products with over 3000 models so i want something like you can do with atttributes.

 

I dont want to use the attributes in the admin as it would take forever to add all these models.

Share this post


Link to post
Share on other sites

Does anyone know how I can make the slave products show up as attributes do in the shopping cart?

When someone clicks buy now, I want the master and slave add to the cart.. but with the slave under the master in italics.

 

any ideas? I've search for the answer to no avail. Thank you in advance.

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

×