Jump to content
Skittles

Optional Related Products, Version 4.0

Recommended Posts

My site is heavily modified. I just had to issues to pass along after installing this update of 2.3.3.2.

 

Addon module: Related products.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /includes/modules/optional_related_products.php on line 42

Reads: if (mysql_num_rows($attribute_query)>0)

Changed mysql to tep_db_

Add-Ons that use the mysql_* or mysqli_* functions should use the tep_db_* functions instead. It's an easy update to perform and as Gary stated, conforms to the osCommerce standards.”

 

Thanks for the info :thumbsup:


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites

The very first part has failed for me I don't see any new options in admin>catalog there is no option for related products I wonder if this is an old contrib I did install the one that says files 2.3.1 and I do have oscommerce version 2.3.3 is that the reason? I just grabbed the most recent download which said 2.3.1...

 

so I guess I have two questions one is this compatible with 2.3.3 I think it looks like yes from two posts above, however

 

question two is which file is the correct one to use?

Edited by INFLICT

Share this post


Link to post
Share on other sites

Okay I figured it out, my files were not writable due to security reasons so some of the changes I made weren't saved, however stay tuned lol. I think I'll be back with more questions soon.

Share this post


Link to post
Share on other sites

I had problems with this addons (modified) in a purchased template, after upgrading to 2.3.2

 

Do not show the module with the associated products

The solution steps:

Change the line:
 

if (mysql_num_rows ($ attribute_query)> 0) {

by:

if (mysqli_num_rows ($ attribute_query)> 0) {

Very simple and worked me!

Edited by quetevendo

Share this post


Link to post
Share on other sites

@@quetevendo correct solution:

 

change any mysql_query to tep_db_query


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

I just uploaded a new bootstraped version:

http://addons.oscommerce.com/info/8057

 

Version 5.0 BS
Version 4.0 (standard)

New features for Version 5.0 BS:
- Modified for Bootstrap
- Product Info Page module has been converted to content module
- Responsive Grid list like in core also purchased products module
- Buy Now button has been removed for less core file changes
- Configuration has been moved to content module
- Database setup has been updated
- All filenames and database table names are hardcoded
- functions have been moved to separate files
- spanish and german language files added
- Admin buttons updated to jquery buttons

Simplified Installation

 

NOTE: I will offer support here only for Version 5.0 BS

 

regards

Rainer

Share this post


Link to post
Share on other sites

I just uploaded a new bootstraped version:

http://addons.oscommerce.com/info/8057

 

Version 5.0 BS

Version 4.0 (standard)

 

New features for Version 5.0 BS:

- Modified for Bootstrap

- Product Info Page module has been converted to content module

- Responsive Grid list like in core also purchased products module

- Buy Now button has been removed for less core file changes

- Configuration has been moved to content module

- Database setup has been updated

- All filenames and database table names are hardcoded

- functions have been moved to separate files

- spanish and german language files added

- Admin buttons updated to jquery buttons

 

Simplified Installation

 

NOTE: I will offer support here only for Version 5.0 BS

 

regards

Rainer

do you have a demo of this?

thanks

Share this post


Link to post
Share on other sites

@@vampirehunter,

 

Sorry, not yet public online.

Installation is 10 min. just try.

Share this post


Link to post
Share on other sites

@@raiwa

Hi

 

Looks like a great contribution. Well done. I have a wee problem regarding the update to BS5 posted ion addons section 25/03/15.

Is this a BS fix or just normal 2.3.4

I cant find the following

 

includes/modules/optional_related_products.php

Find line

if (mysql_num_rows($attribute_query)>0) {

replace it with

if (tep_db_num_rows($attribute_query)>0) {

 

I dont have that file,

 

Any comments how to fix.

 

Many thanks

 

Grandpa

BS234

Share this post


Link to post
Share on other sites

@@grandpaj,

 

this refers to the standard 2.3.4 version, in the bs version this is already fixed. I'll upload an update with cleaned up information soon.

Share this post


Link to post
Share on other sites

@@raiwa

Hi

 

One thing I forgot to mention, when I go to SQL set up utily I get this

 

HEADING_TITLE_ORP

 

SECTION_TITLE_NEW_INSTALL

SECTION_DESCRIPTION_NEW_INSTALL

IMAGE BUTTON NEW INSTAL SQL

 

 

SECTION_DESCRIPTION_UPGRADE

SECTION_TITLE_REMOVE

IMAGE BUTTON UPGRADE SQL

 

SECTION_TITLE_REMOVE

SECTION_DESCRIPTION_REMOVE

IMAGE BUTTON REMOVE SQL

 

Have I missed installing a file, or is this what it should look like. I am using the latest download from burts Github

 

Many thanks

John

Share this post


Link to post
Share on other sites

Hello John @@grandpaj,

 

yes, sorry, the language files for sql_setup_related_products.php are missing in the BS package. You can use for now the file from the standard package:

2_3_4_standard/catalog/admin/includes/languages/english//sql_setup_related_products.php

 

I will fix this in the next update. Thanks for the report

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

 

Hi

 

Thanks for that.

 

The only thing that didn't work. was the buttons. I did upload them.

Probably not a big deal.

 

Many thanks

Looks good (except for the missing buttons)

 

Kind regards

John

Share this post


Link to post
Share on other sites

I really love this contribution and thank you again for creating it but I am having a problem with the inherit button not carrying over sort orders for the sub products from one product to another. Has anyone else had this problem too?

Share this post


Link to post
Share on other sites

Ok after reading over the basic use of this module I see it was never designed to carry over sort orders with the inherit button but has anyone successfully done that?

Share this post


Link to post
Share on other sites

Hello

i using 2.3.4 ver

installed But view this error

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 7

CREATE TABLE IF NOT EXISTS `products_related_products` ( `pop_id` int(11) NOT NULL auto_increment, `pop_products_id_master` int(11) NOT NULL default '0', `pop_products_id_slave` int(11) NOT NULL default '0', `pop_order_id` smallint(6) NOT NULL default '0', PRIMARY KEY (`pop_id`) ) TYPE=MyISAM;

 

please help me

Share this post


Link to post
Share on other sites

@@bkiani,

 

yes, ok this is left from previous versions before 2.3.4.,

in:

admin/sql_setup_related_products.php

 

find line 30:

    ) TYPE=MyISAM;";

change to:

    )";

this should work.

Share this post


Link to post
Share on other sites

hello

i using 2.3.4 ver

installing all done

but can not insert product to related product module

select product and select custom related product and click insert

but no change the product

please help me

thank you

Share this post


Link to post
Share on other sites

@@bkiani,

 

1. did you run the database installation??

2. try to check in both related products.

3. use reciprocate to relate both products to each other

4. post a screenshot of your related product list

Share this post


Link to post
Share on other sites

sorry, can't give you further advice, check again the installation instructions.

I only packed the old version together with my new version for Bootstrap.

 

NOTE: I will offer support here only for Version 5.0 BS

Share this post


Link to post
Share on other sites

thank you for answer

Of course I want to install a version of the bootstrap, but I do not know how to do that does not erase data and my modules

Share this post


Link to post
Share on other sites

thank you for answer

Of course I want to install a version of the bootstrap, but I do not know how to do that does not erase data and my modules

 

Hello @@bkiani,

 

It is possible to upgrade your 2.3.4 store to 2.3.4 bootstrap. However not beeing an official release, there is no official upgrade guide available.

At least the public store part will need a new installation. Then you'll have to add all your add-ons again and redo your customizations.

The Admin part can be easy updated with an available database update.

Please search for keywords: update or upgrade to 2.3.4 bootstrap or 2.3.4 BS, and you'll find a lot of information about that subject.

 

kind regards

Rainer

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

×