Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Thanks!  Due to your locating the general area of the problem, I spent some time comparing the two rather than just overwriting the code...

 

The solution to fix up the new code is rather simple.  From the line of the latest code in contributions:

$products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$listing['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

 

You want to edit this part:

$products_options_name['products_options_id']

and add "_values" to the name, so that it is:

$products_options_name_values['products_options_id']

 

That's all that was wrong  :rolleyes:

Enjoy!

Thanks Donovan and j0ker for spotting this. Corrected version added to contrib page.

 

Brian.

Link to comment
Share on other sites

Great stuff Brian, I have evrything working now great work, just a question is it possible to disable the quantity select box, and have attibutes control quantity allowing price breaks in return?

 

Thx in advance.

Edited by j0ker
Link to comment
Share on other sites

Just set the "buy now" column sort order to 0 in admin.

 

But if you're doing this you will have to include a hidden field for each slave in master_listing.php with a name of "'Qty_ProdId_' . $listing['products_id']" and value of "1". Otherwise nothing will get added to your shopping cart.

 

Brian.

Link to comment
Share on other sites

Sorry Brian, excuse me for being a php nono, but is this easy to do, like a 1 line mod in master_listing or would it require a number of changes which are way out of my league?

Link to comment
Share on other sites

Adding a hidden field takes no effort. I have one in mine to add the description as an attribute so it shows up in the cart. I create a new case and add it in it's own column (you cant see it, but its there) but I think you could just add it to a column that you know will always be there.

Use this code

$lc_text .= tep_draw_hidden_field('Qty_ProdId_' . $listing['products_id'], "1");

It should go after the $lc_text for the original part since the .= adds the text to the string.

 

That should work, you may need to change the 1 part, just view the source and see whats appearing in the value field.

 

Ryan

Edited by ryanf

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

Link to comment
Share on other sites

I have tried putting it in a few places after instructed code but I am not good enough to code php and I cant see where I am goin wrong.

I keep getting a parse error after adding ryans code.

Link to comment
Share on other sites

As an example. Assuming you display the slave's name, change this:

          case 'MASTER_LIST_NAME':
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
           } else {
             $lc_text = ' ' . $listing['products_name'] . '</a> ';
           }
           break;

to this:

          case 'MASTER_LIST_NAME':
           $lc_align = '';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
           } else {
             $lc_text = ' ' . $listing['products_name'] . '</a> ';
           }
           $lc_text .= tep_draw_hidden_field('Qty_ProdId_' . $listing['products_id'], "1");
           break;

Link to comment
Share on other sites

Thx Brian I will have a bash at that, another question I have a list of options about 20 selections but they have no order is it possible to sort these somehow?

 

Many thx for the above code many thx.

Link to comment
Share on other sites

Many thanks for the contribution. I am very impressed with it so far. :)

 

I have installed Master Product + Slave Attributes. I have it working 95% and just need to fix a few errors.

 

Error 1: All attributes are showing correctly on the product info page, but when you add products with attributes to the shopping cart, the attribute information is not added and the price altered.

 

I would be very grateful if you could point me to the likely cause or location of the error as I don?t seem to be able to find it!

 

The other errors are related to other features I have added. I will deal with these later.

 

Many Thanks,

Link to comment
Share on other sites

crap.. i thought i was all good to go, site goes live in 2 days, and i just discovered that 'master products' is not playing well with 'actual attributes'!

 

has anyone messed w/ the mods together? basically allowing an attribute to have:

say the product price is $12

+$5 = price plus $5 = $17

- $5 = price minus $5 = $7

$5 = item is now $5 = $5

 

the items show up ok in the cart itemlist, but the Sub-totals are way off :(

 

thx! look foward to any replies!

Link to comment
Share on other sites

this looks amazing! i have been rollin in my head trying figure out exactly how i was going accomplish this. Only thing is.. does anyone have a list of the changes to be done instead of the files themselves? I have way to many to changes done to even use beyond compare, I tried for quote a while. Any help would be great

Link to comment
Share on other sites

All the changes in the master products are marked by matti for cut&paste modifications. Also Brian's attributes mod is simple code changes to master products.

Link to comment
Share on other sites

Could someone answer me this plz, this is something that has puzzled me far months, but since using this contrib with attributes it come to a head, how are attributes sorted? I cant see any method to the output on screen.

Link to comment
Share on other sites

Thx for that link, I have tried a few of the scenarios in that thread but no joy, I have also tried the attributes sorter contrib, but its a little too much of a hack job on the master products to work for me.

 

Thx for your help, much appreciated.

Link to comment
Share on other sites

All the changes in the master products are marked by matti for cut&paste modifications. Also Brian's attributes mod is simple code changes to master products.

ya i saw that only problem is that i dont know what im replacing, if anything with the changes marked

Link to comment
Share on other sites

Thx for that link, I have tried a few of the scenarios in that thread but no joy, I have also tried the attributes sorter contrib, but its a little too much of a hack job on the master products to work for me.

 

Thx for your help, much appreciated.

Largely depends on what criteria you want them sorted on.

 

Intergrating the attributes sorter is fairly easy on the shop front with or without master prods. I seem to remember the admin hacks were a bit more tricky.

 

Assuming you're going to use a separate sort field (as suggested above) you will need some kind of interface to populate it. This is the hardest bit.

 

Then simply add " ORDER BY (name of sort field)" to the options select statements in product_info and master_listing.

 

The attributes sorter contrib will do this for you, with some extra config settings.

 

Brian.

Link to comment
Share on other sites

Thx for that link, I have tried a few of the scenarios in that thread but no joy, I have also tried the attributes sorter contrib, but its a little too much of a hack job on the master products to work for me.

 

Thx for your help, much appreciated.

Largely depends on what criteria you want them sorted on.

 

Intergrating the attributes sorter is fairly easy on the shop front with or without master prods. I seem to remember the admin hacks were a bit more tricky.

 

Assuming you're going to use a separate sort field (as suggested above) you will need some kind of interface to populate it. This is the hardest bit.

 

Then simply add " ORDER BY (name of sort field)" to the options select statements in product_info and master_listing.

 

The attributes sorter contrib will do this for you, with some extra config settings.

 

Brian.

yep, you are right... that sould do it !!!

 

john

Link to comment
Share on other sites

Hi ,I really apreciate all the help i can get on this..

i have a problem:

 

I do not want the quantities drop down to show in the slave products. I need to have a Field, with the default value = 1. then i need a Buy now button in front of each slave product. Can this be acomplished? I already set the buy now button option but i dont get a button..

 

http://www.miamifreezone.com/store

 

Search in perfumes, master.. thanks a lot.

Link to comment
Share on other sites

Intergrating the attributes sorter is fairly easy on the shop front with or without master prods. I seem to remember the admin hacks were a bit more tricky.

Brian thx for the reply, I appreciate yours and ryans help to sort these problems out.

I have installed the Product Attrib Sort v1.0 no real install problem it just didnt do as it sais on the box, didnt sort anything.

I setup each attribute for example sorting as 1,2,3,4,5, etc but when I attempted to view in catalog they where as before quite random.

 

But I did not get any errors in admin nor catalog so?

 

All I wanted to do was sort them out the way I was entering them in attributes in admin, or alpha would also do the job.

 

Would it help others if I package my master product files with Brians changes already made, it is a clean osc ms2?

Link to comment
Share on other sites

I will attempt the Product Attrib Sort v1.0 install once again, admin is still in place I havnt disabled it, so should be simple. :unsure:

Edited by j0ker
Link to comment
Share on other sites

whodah thx, I have just tried that one, no change no errors just no sort either, I have also just reinstalled the sorter contrib, but no joy there either, I think the install is fubar now, why I dont any errors is beyond me, pure luck, I have changed so many things me heads gone right rd.

 

Thx all for the help just isnt meant to be I think.

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