Jump to content
Johnson

Master Products - MS2

Recommended Posts

When I installed this module, I had a problem with my products that are not slaves. The product_info page would show a drop down box labeled "quantity_text" and the customer had to change the value to 1 to order. Also, none of the options would transfer to the cart.

 

I tracked it down to the form used on the page. Here is the original code:

 

<td width="800" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

and here is the code after MS2 was added:

 

<td width="800" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

 

Here is my fix if anyone is interested:

 

<!-- Master Products //-->

<?php

$master_status_query = tep_db_query("select p.products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$master_check = tep_db_fetch_array($master_status_query);

 

 

if ($master_check['products_master_status'] > 0) {

?>

<td width="800" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

}

else {

?>

<td width="800" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

}

// Master Products EOF

 

 

 

As you can see, I use the products_master_status field to determine which form to draw up. Works like a charm.

 

BG

Share this post


Link to post
Share on other sites

I have a heavily hacked site, and I have gotten the master/slave contribution to work. Right now the only problem is my slaves do not have attributes assigned to them. If I add them through the "product_info.php" page then the attributes work, but through the master_products.php page they don't. Now, I don't really need to give my customers a choice, all of my slaves will have the same attributes, but they need them for my shipping modules to work.

 

Can anyone help me write a simple code to give all of my slaves the same attributes. Here is my application_top code:

 

case 'buy_slave' : if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

}

 

$product_master_status_query = tep_db_query ("select products_master_status, products_master from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$product_master_result = tep_db_fetch_array($product_master_status_query);

$product_master = $product_master_result['products_master'];

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_master));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

}

 

$product_master_status_query = tep_db_query ("select products_master_status, products_master from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

$product_master_result = tep_db_fetch_array($product_master_status_query);

$product_master = $product_master_result['products_master'];

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_master));

break;

 

 

 

Thanks

Share this post


Link to post
Share on other sites

Hi Matti,

ur contrib rocks ! i have been able to install it without much of problem. what i need is specific help. i need to use a pull down menu to display the slaves in product listing as well as product info page. i have more than 40 to 100 slaves per master and it is not possible to list them out using inputtext or radiobutton. i need a routine whereby the slave will be displayed in a drop down just above the 'add to cart' using tep_draw_pull_down_menu in products_new page where i can select it and then press add to cart to populate the shopping cart. the quatity by default is 1 for the selected items. i am also not keen on attributes and just want a simple dropdown of all my slaves. could u help me out

Share this post


Link to post
Share on other sites

Hi guys. This contribution seems really cool and just what I need. Are there any install instructions for those of us who don't have a clean install of OSC? Going through each file trying to find the differences is too time consuming.

 

THANKS! :blush:


If you have a serious problem but it can be solved, why worry about it? If you have a serious problem but it can't be solved, then why worry about it?

Share this post


Link to post
Share on other sites
Hi guys. This contribution seems really cool and just what I need. Are there any install instructions for those of us who don't have a clean install of OSC? Going through each file trying to find the differences is too time consuming.

 

THANKS! :blush:

 

Unfortunately, this is the only reliable method since you woulnd't want to over write vital sections of your code that has already been modified. There are utilitites that can greatly aid in this task such as Beyond Compare, and there's also another one. They are GREAT! You should get them and use them regularly...only way to modify OsC stores.

 

Good luck!


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

Hi all,

 

hope everyone is well. Thanks for looking at this post. I need some help changing style/layout for master listing. I would like to have tabbed content on the page for slave products. I have the divs, javascript and layout complete for tabs, but having a problem showing master listing content. Heres an example of what i need

 

<div class="tabber">

<div class="tabbertab">

<h2>TAB ONE</h2><p>

 

Would like product name, price in this tab

</div>

<div class="tabbertab">

<h2>TAB TWO</h2><p>

 

All tab attributes for each product in this tab

</div>

</div>

 

I hope this makes sense. I would like to thank everyone in advance for looking at this post and for any help, advice, support.

 

Best Wishes,

 

Steven

Share this post


Link to post
Share on other sites
Unfortunately, this is the only reliable method since you woulnd't want to over write vital sections of your code that has already been modified. There are utilitites that can greatly aid in this task such as Beyond Compare, and there's also another one. They are GREAT! You should get them and use them regularly...only way to modify OsC stores.

 

Good luck!

 

 

Thanks for the help. Beyond Compare is awesome. I didn't get to install the contribution because it modifies some lines of code that are already custom. I'll do it manually (even if it'll take a while :P)

 

:thumbsup: A+ Contribution


If you have a serious problem but it can be solved, why worry about it? If you have a serious problem but it can't be solved, then why worry about it?

Share this post


Link to post
Share on other sites
Hi all,

 

hope everyone is well. Thanks for looking at this post. I need some help changing style/layout for master listing. I would like to have tabbed content on the page for slave products. I have the divs, javascript and layout complete for tabs, but having a problem showing master listing content. Heres an example of what i need

 

<div class="tabber">

<div class="tabbertab">

<h2>TAB ONE</h2><p>

 

Would like product name, price in this tab

</div>

<div class="tabbertab">

<h2>TAB TWO</h2><p>

 

All tab attributes for each product in this tab

</div>

</div>

 

I hope this makes sense. I would like to thank everyone in advance for looking at this post and for any help, advice, support.

 

Best Wishes,

 

Steven

 

 

Hi all,

 

Can anyone with this problem, much appreciated thanks

Share this post


Link to post
Share on other sites

Hello,

 

i have following problem with this contrib:

 

After using the product search the buy now button goes wrong.

 

For example: Searching for a product called "Dreirad", i get a list of 5 products. CLicking any buy_now button in this list, results in a "product not found".

Everything else works fine.

 

Any idea?

 

Hoping for help

Dirk

Share this post


Link to post
Share on other sites

Hello,

 

I've installed MP on a very heavily modified store. The problem I am having is I can get my products added to the shopping cart (both masters and slaves have attributes). However, if I delete one item from my shopping cart, it deletes the item I'm trying to delete (correctly) ***AND*** it deletes all the attribute information for all products in the cart (not a desired behaviour!!!). Is there someone that can help me debug this (I will pay someone for helping us on this!!!).

 

Please let me know and thanks!

Shauna

Share this post


Link to post
Share on other sites

So nobody is having any issues with the Also Purchased display? Mine shows the slave product instead of the master product. This is not good. It shows the slave and when they click on it, the display will only show the slave item. It should show the master only in the "also purchased box"

 

Any ideas?

Share this post


Link to post
Share on other sites

Hi there

I've got master products working perfectly for my mp3 download shop

www.skioakenfull.com/shop

 

as a final touch, I'd like to be able to change the number of items dispayed

after each category in brackets to show only the amount of master products

rather than every single item. On my page I have changed 'categories' into 'Artists'

This would allow me to just count albums & EPs for each artist.

 

I've had a look at the code but can't figure out if there I would need to write something

new or just change a value...

 

Can anyone help????

Thanks!

Primaudial

Share this post


Link to post
Share on other sites
Hello,

 

i have following problem with this contrib:

 

After using the product search the buy now button goes wrong.

 

For example: Searching for a product called "Dreirad", i get a list of 5 products. CLicking any buy_now button in this list, results in a "product not found".

Everything else works fine.

 

Any idea?

 

Hoping for help

Dirk

 

I have added a solution for this in the contributes on the 12th of june 2007

master products

Share this post


Link to post
Share on other sites

Someone Said this contribution is the answer to all my wishes. I am making a cosmetic site that has multiple colors for one product, and the customer needs to See the images of the colors, and needs the ability to put the quantity of how ever many they need of that color. This is exactly how i want it

http://www.maccosmetics.com/templates/prod...UCT_ID=PROD1439

 

Before i dedicate a full day to getting this installed and configured correctly, can someone save me some time and tell me if this contribution is what i am looking for? Thanks in advance

Share this post


Link to post
Share on other sites
Someone Said this contribution is the answer to all my wishes. I am making a cosmetic site that has multiple colors for one product, and the customer needs to See the images of the colors, and needs the ability to put the quantity of how ever many they need of that color. This is exactly how i want it

http://www.maccosmetics.com/templates/prod...UCT_ID=PROD1439

 

Before i dedicate a full day to getting this installed and configured correctly, can someone save me some time and tell me if this contribution is what i am looking for? Thanks in advance

 

Wow, after doing some research i see that this contr. is perfect for what i want to do. But i have only seen like 2 example sites that are running this contr. and they are missing the most important feature to me, a image of the slave product. Does this contr. allow you to see a picture of the slave product?

Share this post


Link to post
Share on other sites

I have a problem in that I can't make new master products (the tick for master product won't save)

 

Where is this function so I can look at it?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites
I have a problem in that I can't make new master products (the tick for master product won't save)

 

Where is this function so I can look at it?

 

Further, I can change it in the database, just not on the product info page.

Edited by mpm

For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

I have 1 question and 1 new problem.

 

1. Part of the install involves: catalog/includes/boxes/suggested_accessories.php

When does that show up? How do you use it? etc? Basically, I've never seen that box in either right or left column of my site and I think it would be useful to have. Anyone?

 

2. I'm not 100% sure that this issue is related to Master Products, but I believe it is. First, let's say I have added items in my cart. Now, let me select one of my categories in the categories box (left column). Now lets say there are 5 different manufacturers in that category. If I click the Show: dropdown menu to choose one of the manufacturers - I lose whatever is in the shopping cart. I also notice that if I was already logged in, that I get logged off as well. However, if I was to actually choose Buy Now from list and then go back to the main page and log in. All the items that were in my cart are now back in the cart along with the new item I just chose. Since it logs me of I think it may have something to do with cookies, but I don't know.

 

??

Share this post


Link to post
Share on other sites

If a custoer is on one of the category pages and he uses the show: all manufacturers dropdown menu at the top of the screen above the products...he automatically gets logged off and loses whatever is in the shopping cart. If someone could point me in the right direction of what file controls that dropdown menu maybe I could fix it...or maybe somebody can tell me how to fix it.

Share this post


Link to post
Share on other sites

Hi

 

I got master products installed on a mp3 site and whenever i set the price to 0 the tick box is disabled and i cannot add the product to the cart. i want to be able to add the product even if the price is 0.

 

i wonder if anyone could help me,i really appritiate it. many many thanks in advance

Share this post


Link to post
Share on other sites

Is there any way to have the master product shown in the same table as the slave products on the product info page?

 

My customers are confused with having 2 different buy now buttons in different places..

 

It would make it neater and less confusing to my customers if it was all in the same table..

 

Any help would be much appreciated.

Thanks

Share this post


Link to post
Share on other sites

Hi,

I am using Master Products to sell music digitally but I also want to sell physical merchandise.

The problem I am experiencing is that the slave downloads are not considered beeing virtual content once I check out.

It works for the master attributes but not for the slaves.

This is a problem since I want to have the cash on delivery module installed, and if I have it installed the slaves can be downloaded without paying.

 

I am not that experienced with php, sql and oscommerce but at a first glance everything seems to be in its order.

 

This is the code found in catalog/checkout_shipping.php

 

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
 if ($order->content_type == 'virtual') {
   if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
   $shipping = false;
   $sendto = false;
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 }

 $total_weight = $cart->show_weight();
 $total_count = $cart->count_contents();

 

from there on I checked catalog/includes/classes/shopping_cart.php

and found this code

      if ( (DOWNLOAD_ENABLED == 'true') && ($this->count_contents() > 0) ) {
       reset($this->contents);
       while (list($products_id, ) = each($this->contents)) {
         if (isset($this->contents[$products_id]['attributes'])) {
           reset($this->contents[$products_id]['attributes']);
           while (list(, $value) = each($this->contents[$products_id]['attributes'])) {
             $virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . (int)$products_id . "' and pa.options_values_id = '" . (int)$value . "' and pa.products_attributes_id = pad.products_attributes_id");
             $virtual_check = tep_db_fetch_array($virtual_check_query);

             if ($virtual_check['total'] > 0) {
               switch ($this->content_type) {
                 case 'physical':
                   $this->content_type = 'mixed';

                   return $this->content_type;
                   break;
                 default:
                   $this->content_type = 'virtual';
                   break;
               }
             } else {
               switch ($this->content_type) {
                 case 'virtual':
                   $this->content_type = 'mixed';

                   return $this->content_type;
                   break;
                 default:
                   $this->content_type = 'physical';
                   break;
               }
             }
           }
         } else {
           switch ($this->content_type) {
             case 'virtual':
               $this->content_type = 'mixed';

               return $this->content_type;
               break;
             default:
               $this->content_type = 'physical';
               break;
           }
         }
       }
     } else {
       $this->content_type = 'physical';
     }

     return $this->content_type;
   }

 

The virtual check query looks as I think it should, I checked the database tables and it all seems to be ok.

 

I don't find anything regarding VIRTUAL in the product_info.php files

maybe I missed something or I'm checking the wrong files.

 

Please help out since this surely is not only my consern

Thank you in advance

/Jascha Becker

jascha@squeak-music.com

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

×