Zen Cart Logo
Forums / All Other Contributions/Addons / Related Products

Related Products

Views: 11,555

Results 41 to 52 of 52
24 Jan 2019, 9:56 AM
#41
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Related Products

hello, a link appears at the top that says:
Related Products not installed[Click to Install]

if I click install, which leads to the domain.om/index.php?install_related_products=yes
link nothing happens, can someone tell me what I can do?

v. 1.5.5e

thank you

20 May 2019, 5:46 AM
#42
oopsibrickedit avatar

oopsibrickedit

Zen Follower

Join Date:
Mar 2012
Posts:
132
Plugin Contributions:
0

Re: Related Products

I installed this great plugin on 1.5.0 and got it working except it shows only 1product per row. Does anybody have had same problem and maybe a fix to it?

22 May 2019, 7:15 PM
#43
oopsibrickedit avatar

oopsibrickedit

Zen Follower

Join Date:
Mar 2012
Posts:
132
Plugin Contributions:
0

Re: Related Products

OopsIbrickedIT:

I installed this great plugin on 1.5.0 and got it working except it shows only 1product per row. Does anybody have had same problem and maybe a fix to it?

It was a CSS-problem, below a solution which worked for me:

#relatedProducts	{text-align: center; float:left;}
.centerBoxContentsRelatedProduct	{float: left; margin: 1em 0; display: inline-block; width:25%;}

Note that I have 4 products side by side so widht is therefore 25%. For 3 products as standard installation it should be 33%

Also here is a fix for 1.5.x giving an sql syntax error when pressing install button:

INSERT INTO zen_configuration 
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) 
VALUES ('Related Products Columns per Row', 'SHOW_PRODUCT_INFO_COLUMNS_RELATED_PRODUCTS', '3', 'Related Products Columns per Row<br />0= off or set the sort order', '18', '100', NULL, now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\', \'11\', \'12\'),')
22 Jan 2025, 6:17 PM
#44
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Related Products

I know this an old thread, but instead of creating another thread i will go a head and post here and hopefully some can help.

I installed zen cart 2.1.0 and i love it, it is a fresh installation with an upgraded database fro ZC 1.5.5f,
i do not need lots of plugins but i have to have 3 plugins installed and one of them is Related Products (the latest),
I followed the installation procedure and i already have the "Related Family" column in the product table from previous installation,

I grouped related products together and update the table (after i backed up the database), products shows nicely under the related products header, i am happy with it except for one thing, lots of log warnings and almost all of them is like this:

[22-Jan-2025 17:50:12 UTC] Request URI: /Admin/index.php?cmd=display_logs, IP address: x.x.x.x, Language id not set
#0 /Admin/includes/functions/extra_functions/reloaded_related_products_functions.php(91): zen_debug_error_handler()
#1 /Admin/includes/init_includes/init_general_funcs.php(56): require('/home/user/...')
#2 /includes/autoload_func.php(40): require_once('/home/user/...')
#3 /Admin/includes/application_top.php(40): require('/home/user/...')
#4 /zc_plugins/DisplayLogs/v3.0.2/admin/display_logs.php(35): require('/home/user/...')
#5 /Admin/index.php(28): require('/home/user/...')
--> PHP Warning: Undefined array key "remove_reloaded_related_products" in /Admin/includes/functions/extra_functions/reloaded_related_products_functions.php on line 91.

Line 90 and 91 from reloaded_related_products_functions.php
90>> if( !empty($_POST) AND $_GET['install_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_install();
91>> if($_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

BTW, nothing showed under configuration/Products_info or anywhere else, the only place i saw it referring to related products under
Admin is in Tools/system_inspection/

Missing Admin Configuration Pages

Anyone can tell me what is missing? I can live with this error/warning but i have to delete these log files every day or 2 days. Thanks in advance.

PHP Version: 8.3.15 (Zend: 4.3.15)
Database Engine: MySQL 10.5.27-MariaDB
Zen Cart 2.1.0

23 Jan 2025, 8:03 AM
#45
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Related Products

Well, i do not know what line 91 do in the post above, i know one thing when you browse the site and every time you click to go to another page it was creating a log file indicating a warning in line 91.

So, i decided to comment out lines 90 and 91 from /Admin/includes/functions/extra_functions/reloaded_related_products_functions.php
if( !empty($_POST) AND $_GET['install_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_install();

if($_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

And now every thing is working fine and there is no more log files generated.

26 Jan 2025, 6:32 PM
#46
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Related Products

why do people insist on installing plugins that have not been touched in 7 years into ZC 2.10
When the related products module clearly states at the top > Please note: does not work with Zen Cart 1.5.8/PHP8. Please use https://www.zen-cart.com/downloads.php?do=file&id=2334
pointing to the Cross Sell Advanced II plugin which I have just tested on 2.10 on php8.3/php8.4 without any issues or logs generated

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

27 Jan 2025, 8:25 AM
#47
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Related Products

barco57:

why do people insist on installing plugins that have not been touched in 7 years into ZC 2.10
When the related products module clearly states at the top
pointing to the Cross Sell Advanced II plugin which I have just tested on 2.10 on php8.3/php8.4 without any issues or logs generated

Hi Mike,

I will tell you why.

Using Zen Cart since 2007, some of these plugins became part of zen cart, got used to them.
If i want to install zen cart 2.1.0 without any plugins i will not go that way, why? for example
all my URLs shows and indexed in the friendly URL format, so i have to the plugins for that even if it is wrinkled
and hoping to Iron that out.

Having said that, i do not mined having error/warning log file generated as long as i get what i want from the plugin and those errors/warnings does effect the functionality of the software.

Thanks for pointing out that Cross Sell Advanced II plugin works with zc2.1.0

27 Jan 2025, 8:59 AM
#48
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Related Products

TamyA:

Well, i do not know what line 91 do in the post above, i know one thing when you browse the site and every time you click to go to another page it was creating a log file indicating a warning in line 91.

So, i decided to comment out lines 90 and 91 from /Admin/includes/functions/extra_functions/reloaded_related_products_functions.php
if( !empty($_POST) AND $_GET['install_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_install();

if($_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

And now every thing is working fine and there is no more log files generated.

The issue is that in the call remove_reloaded_related_products has not been set.
you could change line 91 to

if(exists($_GET['remove_reloaded_related_products']) AND $_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

That way you are maintaining the functionality of the code.
Similarly if $_GET['install_related_products'] is causing a problem add the exists check into the check before you check the actusl value.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

27 Jan 2025, 3:08 PM
#49
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Related Products

while the thought is correct, i think the execution is wrong.

@brittainmark's code should be:

//from
if(exists($_GET['remove_reloaded_related_products']) AND $_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

//to
if (!empty($_GET['remove_reloaded_related_products']) && $_GET['remove_reloaded_related_products'] == "yes" && basename($_SERVER['PHP_SELF']) == 'index.php') {
    reloaded_related_remove();
}

i do not beleive exists is a function. and i would change the AND to &&.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

28 Jan 2025, 9:55 AM
#50
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Related Products

Good spot, obviously I had a brain fart! @carlwhat is correct. (I meant to use isset()) empty is better. Thanks.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

29 Jan 2025, 7:06 PM
#51
tamya avatar

tamya

Zen Follower

Join Date:
Feb 2007
Posts:
336
Plugin Contributions:
0

Re: Related Products

carlwhat:

//from
if(exists($_GET['remove_reloaded_related_products']) AND $_GET['remove_reloaded_related_products']=="yes" AND basename($_SERVER['PHP_SELF']) == 'index.php') reloaded_related_remove();

//to
if (!empty($_GET['remove_reloaded_related_products']) && $_GET['remove_reloaded_related_products'] == "yes" && basename($_SERVER['PHP_SELF']) == 'index.php') {
reloaded_related_remove();
}



I tried the second line i was able to access the store front fine  but when i go to the admin it give me
HTTP Error 500
30 Jan 2025, 5:01 AM
#52
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: Related Products

TamyA:

I tried the second line i was able to access the store front fine but when i go to the admin it give me
HTTP Error 500

that would indicate a log file.

provide a log file receive help.

do not provide a log file, receive a request to provide log file.

funny how that works.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.