Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Hi Matti,

 

Great contribution. I spent the best part of a day getting it integrated and applying the mods from this thread but now it's in it's working great.

 

However, I have two small problems I need to fix. The first is that I want to acheive this layout as suggested in an earlier post

 

screenie.jpg

 

How would I go about it? I'm not too hot on SQL so I'm not sure how to get the products listed in the correct way to acheive this.

 

The other problem is the 'Bestsellers' info box. I want this to group the counts for the slaves together to get a count for the master. So it would change this

Product B in Red 20
Product A in Blue 15
Product A in Red 10
Product B in Blue 2

to this

Product A 25
Product B 22

 

Thanks for any help you can offer.

 

James

Link to comment
Share on other sites

I know this has been posted somewhere else in the forum, but I must ask again... for a good reason. Is there any simple way to hide slave products on the manufacturer's page? See, I'd just make all the slaves have no manufacturer as suggested, but I'd have nearly 7500-8000 items I'd have to do that to and I cannot access our database to make any changes. As you can imagine, editing 8000 items would be HIGHLY impractical... suggestions? Comments? Just tell everyone to deal with it? Just kill off the manufacturer's page altogether? Demand access to the database?

 

HINT: The first two will not happen... possibly a chance on the latter. :)

"Success has nothing to do with what you gain in life or accomplish for yourself. It's what you do for others."

 

- Danny Thomas, founder of St Jude Children's Research Hospital

Link to comment
Share on other sites

Edit the query for the products that are displayed on the manufacturer's page. Just set it to

select blah blah from blah blah where product_is_master=1

 

You might want to check and make sure the name of the database field is correct there, I'm not 100% sure. But, this should select only products from that manufacturer that are master products.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

No offense, BlueNote, I have no earthly clue what you are talking about. Where am I to look for this code at? Any idea what line it would be, or at least a general area? I'm a PHP newbie and don't totally know what's going on with it.

 

Help me!

Tim

"Success has nothing to do with what you gain in life or accomplish for yourself. It's what you do for others."

 

- Danny Thomas, founder of St Jude Children's Research Hospital

Link to comment
Share on other sites

been looking at this contribution for one of our stores...we need to have a one-to-many relationship between the slaves and the masters (individual components can be used in several different products, several times PER product - complicated).

 

two questions:

 

1. will the next release support this type of relationship, and

 

2. is there an estimated release date or timeframe for said release?

 

thanks a ton in advance!!!

Link to comment
Share on other sites

I couldn't tell you a line number...my files are pretty far from stock. But, look for a section that has several different sql queries (each line will start with "tep_db_query.....") and I believe they're pretty well marked as to which one is for which. One will show all products in a category, one shows all products by a manufacturer, etc.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

been looking at this contribution for one of our stores...we need to have a one-to-many relationship between the slaves and the masters (individual components can be used in several different products, several times PER product - complicated).

 

two questions:

 

1. will the next release support this type of relationship, and

 

2. is there an estimated release date or timeframe for said release?

 

thanks a ton in advance!!!

If you don't care about quantity of items in stock, at this moment you could have multi copies of products to suit your needs although most people do care about stock quantity.

 

This mod is great, and I can't wait for the next release either, I hope slave products can have popups for the thumbnails as well.

Link to comment
Share on other sites

hi - got a serious problem:

 

 

master products works great but...

 

it adds the slave products to my cart - but not the master...

 

 

...any idea what i did wrong? :unsure: :blink:

 

 

and another question - is it possible to assign more than one master to a slave product?

Edited by iveo
Link to comment
Share on other sites

It's not suposed to add the master is it?

I shall upload a few updated files hopefully tonight (this is not version 2 - just some things I have done locally) - this will better show how Master Products is intended, including adding the Master when required.

 

Matti

Link to comment
Share on other sites

I tried to add a field for adding qty but it doesn't work... (im no php pro)

 

<!-- Master Products //-->      
<?php if ($product_master['product_master_status']!= 1) { ?> 
               <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); ?></td></form>
<?php
}
?> 
<!-- Quantity pull down Menu for Master Product -->
                <?php
                for ($i=0; $i<20; $i++) {
                $qty_array[] = array('id' => $i+1, 'text' => $i+1);
                }
                ?>
               <td class="main" align="right"><?php echo TEXT_AMOUNT . tep_draw_pull_down_menu('quantity', $qty_array, 1); ?></td>
<!-- Quantity pull down Menu for Master Product EOF-->
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '20', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>


<?php

$master_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_master =  '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$results = tep_db_fetch_array($master_query);
if ($results['products_id'] != null) { ?>

  <tr>
   <td align="left" class="main"> <?php echo TEXT_SLAVE_PRODUCTS; ?></td>
  </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>   
  <tr>
   <td><?php include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTS); ?></td>
  </tr>
  
<?php    
 }     
?>
<!-- Master Products EOF //-->

 

 

 

so master products is not supposed to be able to add a master to cart? :blink:

Edited by iveo
Link to comment
Share on other sites

an other thing - is it possible to set an exisiting product as a master? or does it only work for new ones?

 

does the master product show up in my products table of the osc database?

 

why cant i puchase a master product?

Link to comment
Share on other sites

an other thing - is it possible to set an exisiting product as a master? or does it only work for new ones?

 

does the master product show up in my products table of the osc database?

 

why cant i puchase a master product?

Perhaps you should spend just a little time reading this thread - the beginning is a good place to start :P

 

Like I said, I shall upload some files (if I don't spend all night answering ?'s on the forums :lol: )

 

Matti

Link to comment
Share on other sites

I?m trying to install MP2, and when i execute master.sql i have this error:

 

Error

 

consulta SQL : 

 

INSERT INTO configuration_group

VALUES ( 16, 'Family Products', 'Family Products - configuration options', 16, 1 )

 

MySQL ha dicho:

 

 

#1062 - Duplicate entry '16' for key 1

 

I have no sql idea so...

 

any help?

Link to comment
Share on other sites

I?m trying to install MP2, and when i execute master.sql i have this error:

 

 

Error

 

consulta SQL :?

 

INSERT INTO configuration_group

VALUES ( 16, 'Family Products', 'Family Products - configuration options', 16, 1 )

 

MySQL ha dicho:

 

 

#1062 - Duplicate entry '16' for key 1

 

I have no sql idea so...

 

any help?

It looks like you are trying to insert the SQL for Family Products instead of Master Products.

 

Matti

Link to comment
Share on other sites

A minor update has been uploaded - some of the suggestions/snippets posted here have been used.

 

This package should be somewhat easier for newbies to use.

 

A note on product Masters - a quantity select menu has been included for the Master - if a price is assigned to the master in admin this menu will appear. The menus are based on stock with a limit of 20 on the list.

 

Existing products may be assigned as Masters or removed (products_master_status)

 

I have targeted the Easter break as free time to concentrate on things I really wish to do with Master Products :P

 

Matti

Link to comment
Share on other sites

still thank you - I think what you just did was the best open-source support - no - the best support i've ever seen!

 

 

...i asked for some things and 3 hours later they are done!!!

 

 

wooow! thanks a lot! :rolleyes:

Link to comment
Share on other sites

i got this error at the box where specials should be:

 

 

Fatal error: Call to undefined function: tep_get_customers_groups_id() in C:\apache\htdocs\osc\includes\boxes\specials.php on line 15

 

 

does anyone get the same error after updating?

Edited by iveo
Link to comment
Share on other sites

I?m trying to install MP2, and when i execute master.sql i have this error:

 

 

Error

 

consulta SQL :?

 

INSERT INTO configuration_group

VALUES ( 16, 'Family Products', 'Family Products - configuration options', 16, 1 )

 

MySQL ha dicho:

 

 

#1062 - Duplicate entry '16' for key 1

 

I have no sql idea so...

 

any help?

It looks like you are trying to insert the SQL for Family Products instead of Master Products.

 

Matti

If I try to execute master.sql on Master Product 1.1.3 i get this error:

 

Error

 

consulta SQL :

 

INSERT INTO configuration_group

VALUES ( 16, 'Slave Products', 'Slave Product Listing - configuration options', 16, 1 )

 

MySQL ha dicho:

 

 

#1062 - Duplicate entry '16' for key 1

 

 

As i say, i?m a newbie with sql :unsure:

Link to comment
Share on other sites

Hi Johnson

 

Will it be possible that we can assign the slaves to multiple master products?

 

  E.g--> Master:1

            Slave:1

            Slave:2

            Slave:3

 

    Master:2

    Slave:1 (Also with Master:1)

    Slave:3 (Also With Master:1)

 

  And aso the Ability in the Admin to enable/disable description or not in the slave listing

 

  I hope you get what I mean

 

 

Yes - you must use the 'copy to' button on the admin>category/product listing page and select the 'duplicate' option - you may duplicate to the same category or another, then 'edit' to assign a different Master Product to the duplicate.

 

You can toggle the description on/off in admin>configuration>Slave Products>Display Slave Product Description - set this to '0' to hide the description.

which "copy to" button - cant see it?! :huh:

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