Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Fresh install of Master Products for Rc2a. V1.21 on an untouched Installation of OSC2.2RC2a... and when I visit the index.php page i get:

 

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/dutygear/public_html/OSCTEST/includes/classes/currencies.php on line 85

 

/cryface

 

This is the third time I've installed this contribution on both modified and unmodified stores. Anyone had this issue before?

Link to comment
Share on other sites

Fresh install of Master Products for Rc2a. V1.21 on an untouched Installation of OSC2.2RC2a... and when I visit the index.php page i get:

 

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/dutygear/public_html/OSCTEST/includes/classes/currencies.php on line 85

 

/cryface

 

This is the third time I've installed this contribution on both modified and unmodified stores. Anyone had this issue before?

 

You have an error somewhere in your code. It should look like this:

 

//Master Products
function display_price($products_price, $products_tax, $quantity = 1) {
	if($products_price == '0') {
	return '';
  }else{		
  return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
  }
}
//Master Products EOF

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Fixed, thank you!

 

FYI, this is the code that is in the latest contribution and is what I used to add to the currencies.php file.

//Master Products
function display_price($products_price, $products_tax, $quantity = 1) {
if($products_price == '0') {
return '';
} else {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
//Master Products EOF

 

It's obviously different from the code you just gave me.

Link to comment
Share on other sites

That probably worked with the original ms2.2, but certainly not with any of the RC releases, or any older shop that has done any security updates. The code I sent uses newer code introduced to fix some security vulnerabilities. Unfortunately, these changes are normally hard to track as most users that started with this contribution have carts so modified, they bear little resemblance to the original MS2.2 code.

 

This forum is an informal help area, and has not been a support forum for the contribution for a long time. Very few updates have been published to the no-longer supported contribution.

 

Glad I could help.

 

George

 

 

Fixed, thank you!

 

FYI, this is the code that is in the latest contribution and is what I used to add to the currencies.php file.

//Master Products
function display_price($products_price, $products_tax, $quantity = 1) {
if($products_price == '0') {
return '';
} else {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
//Master Products EOF

 

It's obviously different from the code you just gave me.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

I updated the package... missing files and your last bugfix Geotex. I'm not a coder, but I try to help the community :)

I love oscommerce and OS software! I'm not a programmer, I'm only a learning boy and a translator :) I love full contribution packages!

Link to comment
Share on other sites

I updated the package... missing files and your last bugfix Geotex. I'm not a coder, but I try to help the community :)

 

Ok. I am NOT criticizing you, just making a general comment. If one is going to upload packages, do the community a favor and double check the work so one doesn't have to upload several sets of files in 4 days. Also, it is normal to give the person credit that solved a bug one couldn't find the solution for.

 

With a low 6-digit member number, you've been around here long enough to know the problems having 20 versions of the same package with mistake after mistake corrected because one did not thoroughly debug something before posting or didn't properly relate the install to a default set up of osCommerce. :)

 

All my grumbling aside, welcome to this forum. I am glad we were able to help and look forward to your experience and input assisting all who stumble upon this 120 page or so monster thread.

 

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Maybe I'm missing it, but when I hit add to cart with the quantity of each slave it correctly adds the slave but also adds the master! I don't want it to add the master!!!

 

Still haven't got this figured out. It is an issue with the application_top.php - but nothing seems to fix it.

 

I can either get the selected slave and master to add or the master only - but I can't get just the selected slave to go. I've tried a ton of configurations posted in this thread + a couple more, but nothing seems to work!

 

Any help would be appreciated!

Link to comment
Share on other sites

I installed Master Products, but I'm a bit confused.

 

1) Each of the "slave" products show up as well as the master product, regardless whether I check "hide" or "show" the slave product. What exactly is that option supposed to do?

 

2) If I click on the "Add to cart" button or "buy now" next to one of the slave products, it says, "product not found!"

 

3) In the Master product listing, there is an option box, but no image that shows the slave product.

 

4) It will not let me upload an image for a mater product.

 

Can anyone show me how this is supposed to work?

Link to comment
Share on other sites

Still haven't got this figured out. It is an issue with the application_top.php - but nothing seems to fix it.

 

I can either get the selected slave and master to add or the master only - but I can't get just the selected slave to go. I've tried a ton of configurations posted in this thread + a couple more, but nothing seems to work!

 

Any help would be appreciated!

 

did you solve this problem yet? If so, let us know where the error was.

 

What other major contributions have you installed? SPPC? Quantity Price Break? Some of these are really tough to get working together.

 

I assume you have double checked all your coding in product_info.php? A lot of errors happen here because of changes to the way the form is called, and database calls need to be cleaned up for mySQL 5.

 

Did you set the master quantity to 0?

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

did you solve this problem yet? If so, let us know where the error was.

 

What other major contributions have you installed? SPPC? Quantity Price Break? Some of these are really tough to get working together.

 

I assume you have double checked all your coding in product_info.php? A lot of errors happen here because of changes to the way the form is called, and database calls need to be cleaned up for mySQL 5.

 

Did you set the master quantity to 0?

 

I'm sad to say I haven't figured this out yet! I have SPPC installed and working correctly. I have this exact same setup on another site and all is fine... I can't figure it out!

 

I've gone over product_info a couple of times and couldn't find any issues.

 

I will say this site is built off of a template (what a mistake! this was my first oscommerce site - won't do a template again as they are butcher jobs... at least this one is!).

Link to comment
Share on other sites

I figured out how to make the image display next to the slave product when viewing the master object. I still can't figure out how to make the slave products not show up at all except in the master product. It's still showing up as its own product with a buy now button that goes to a product that doesn't exist....

 

and I still can't add an image to the master product.

Link to comment
Share on other sites

I'm sad to say I haven't figured this out yet! I have SPPC installed and working correctly. I have this exact same setup on another site and all is fine... I can't figure it out!

 

I've gone over product_info a couple of times and couldn't find any issues.

 

I will say this site is built off of a template (what a mistake! this was my first oscommerce site - won't do a template again as they are butcher jobs... at least this one is!).

 

If they are on the same server, tough to answer, but probably in a configuration, function, class or language file that calls a fixed address via a direct path (/home/mydom12/var/www/html) instead of a domain reference (www.mydom12.com/file.php)

 

If on different servers, in addition to the above checks. look at the server configuration, being sure that globals and magic quotes are set the same as your working system.

 

I run into periodic problems like this where I have 2 servers with the same hosting company, supposedly the same lamp and control panel setup, but they still work differently, and have to make minor changes here and there in various files to get all working. If your servers, like mine, tend to swallow database and debug errors, you can install something like Apache Friends XAMPP or similar to have a local setup. They usually have image display problems that you don't have on the server, but they will show errors to help you debug.

 

HTH

 

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

I figured out how to make the image display next to the slave product when viewing the master object. I still can't figure out how to make the slave products not show up at all except in the master product. It's still showing up as its own product with a buy now button that goes to a product that doesn't exist....

 

and I still can't add an image to the master product.

 

Glad to see you are making progress. Hopefully, mainly just typo's that needed to be fixed.

 

Re Display of slave product: This is most likely a problem with a database call in index.php, where the product is not sending the master products status and master_product_id properly to product_info.php. Double check the code, and especially your database calls.

 

 

Re Uploading image: Look carefully in your /catalog/admin/categories.php. You almost certainly will find a typo or missed database call in the code changes for proper insertion and updating your database. Most all errors here are with the database, with the rest of the code changes for adding/editing a master product correct. I am sorry I cannot furnish a proper call, or line numbers as I have so many changes to this file, it almost resembles nothing from osCommerce.

 

HTH

 

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Glad to see you are making progress. Hopefully, mainly just typo's that needed to be fixed.

 

Re Display of slave product: This is most likely a problem with a database call in index.php, where the product is not sending the master products status and master_product_id properly to product_info.php. Double check the code, and especially your database calls.

 

 

Re Uploading image: Look carefully in your /catalog/admin/categories.php. You almost certainly will find a typo or missed database call in the code changes for proper insertion and updating your database. Most all errors here are with the database, with the rest of the code changes for adding/editing a master product correct. I am sorry I cannot furnish a proper call, or line numbers as I have so many changes to this file, it almost resembles nothing from osCommerce.

 

HTH

 

George

 

I simply followed the install instructions and copied the bit of code into the index.php file. It was one simple step. I don't really know what to check.

 

Here is the code I copied from the instructions and replaced the bit of code around line 191:

 

//Master Products
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_master = '0' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
// Master Products EOF

Link to comment
Share on other sites

Is it possible to make the default number of each item 0 rather than 1? If someone only wants a few, I don't want them to have to change the rest to 0.

Edited by m u r
Link to comment
Share on other sites

I got the index.php page to work, but I went through all of the /admin/categories.php modifications step by step and made sure there wasn't another similar block of text that I should be replacing and it still won't let me upload images.....PLEASE HELP. Can someone give me their modified categories file so I can test to see if that's the trouble?

Link to comment
Share on other sites

I got it working. Now, how do I make it so the default quantity of the slave products is 0 rather than 1?

 

Search through the thread - it is mentioned several times.

Link to comment
Share on other sites

Search through the thread - it is mentioned several times.

How are you doing? did you solve your problem, and if so, how?

 

George

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

How are you doing? did you solve your problem, and if so, how?

 

George

 

Not yet - I put another 4 hours into it the other day, but haven't made it through your whole list of suggestions... I'm totally at a loss! I hope to work on it tomorrow or Monday again.

Link to comment
Share on other sites

Not yet - I put another 4 hours into it the other day, but haven't made it through your whole list of suggestions... I'm totally at a loss! I hope to work on it tomorrow or Monday again.

Sorry I could not be more specific. When you have a working system then move it and it quits, it takes a lot of hunting. Is there anything else you might share about the differences between the packages or servers that I don't know?

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Sorry I could not be more specific. When you have a working system then move it and it quits, it takes a lot of hunting. Is there anything else you might share about the differences between the packages or servers that I don't know?

 

Pretty much everything is identical... different servers - same host... all mods are the same on both sites. I'm sure it is one tiny thing that I haven't found, but it will be found!

Link to comment
Share on other sites

Pretty much everything is identical... different servers - same host... all mods are the same on both sites. I'm sure it is one tiny thing that I haven't found, but it will be found!

You said you have a templated system. Is it custom or one of the forks floating around, like oscMax or CRE Loaded?

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Pretty much everything is identical... different servers - same host... all mods are the same on both sites. I'm sure it is one tiny thing that I haven't found, but it will be found!

 

It's custom... took a vanilla OSC and modified to remove all tables and get a custom design going.

Link to comment
Share on other sites

It's custom... took a vanilla OSC and modified to remove all tables and get a custom design going.

 

I should back up - the above is on the one that works - the install I'm having trouble with is on a piece of junk purchased template from template monster. I didn't realize how bad it was until I built my own!

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