Thank you.
Printable View
Thank you.
I am trying to install Multi Cross Sell v.1.03 on a freshly installed Zen Cart v.1.5.1, and having trouble passing through the "install" button, where it returns
"WARNING: An Error occurred, please refresh the page and try again."
The php version is 5.4.1.6, Mysql v5.5.32 on XAMPP v1.8.2.
Is there something I can do to troubleshoot this problem? Thank you in advance =)
Thank you for such quick reply Gilby, please keep up the amazing work with Multi Cross Sell module!
It would be great if someone knows how to make this: http://www.zen-cart.com/downloads.php?do=file&id=829 (Sidebox for Cross Sell) work with the mod. This Multi Cross Sell is superior to the other ones but I wish it can be displayed in a sidebox. You can see an example of what I am looking for here: http://www.clevershoppers.com/index....ducts_id=65420 in the Related Product box.
Thanks for creating this one.
Hi,
I'm having some problems with this plugin: in the product page the related products are not displayed anymore.
For example: http://goo.gl/nO3mp6
How could I fix it?
thank you for your help...
The product info page displayed doesn't have the mod's code in it.
Even if it doesn't show you would still see the placeholders in the source code.
So the fix is to put the code back into the product_info.php page.Code:<!-- BEG: Multi Cross-Sell mod -->
<!-- END: Multi Cross-Sell mod -->
Well, I tried to make this: http://www.zen-cart.com/downloads.php?do=file&id=829 work but was unsuccessful. If anyone else have a better chance please let me know. In the meantime, I will revert back to one of the other cross sell mod that allows for loading the cross sell in a side box. Thanks!
"Customize each Cross Sell's Box headings to be more relevant to its purpose."
I may just be blind, but I can't find the button/means to do this. Where is this located? I read over the "how to use" and the "README", yet it doesn't explain.
Wonderful plugin, btw. Very helpful (:
The headings are defined here:
includes\languages\english\extra_definitions\YOUR_TEMPLATE\multi_xsell_box_defin es.php
How many cross sells do you have defined?
You define more in admin->configuration->Cross Sell Settings-> Number of Cross Sells
Don't go overboard for most sites only need a handful.
btw: Each cross sell "heading" can be used for thousands of individual cross sell product to product.
Hi, I'm sure I've searched for this before, but this module is so good that I'm trying again.
I'd like this to work for document_product type.
Would this be simple enough to do for a non coder?
Didn't have any trouble with the regular install, but am sure it would be trickier for another product type.
Thanks...
I have never had a need to do this so have never previously tried to do this.
Just did a quick test...
I don't seem to have any reference to "product_type" in the code so that should allow this to work.
Created a new "document product"
Cross sell with a normal "product general"
No problems in the admin.
Displaying the product info page of the "product general" item show the "document product" item as a cross sell, OK.
Displaying the product info page of the "document product" item DOESN'T show the "product general" item as a cross sell.
Not surprising as this uses the "document_product_info.php" (which is not customised)
instead of "product_info.php" which does have the cross sell display code.
So... I haven't tried it but it should be a relatively simple matter to add the cross sell code that was added to "product_info.php" to "document_product_info" as well.
Remember to copy the "document_product_info.php" to your overide directory.
And of course, don't use on a live store until you have confirmed that it works.
Let us know how you go?
I will put it down as a possible extension to the existing code.
Thanks so much Gilby for the good info.
I just found that bit of code in my document_product_info already there, so I must have given it a shot at some stage.
I'll look further now that I've got your info that it may be the right idea, but thought I'd say thanks before the mission makes me forget.
Will certainly post if I make it work, but yes, if you could add it to a future update that would be superb :)
Success! The first time I tried to install the whole module, I'd put the code in for my normal products and also my document_product.
However, I'd pasted the first bit of code for perhaps a single cross sell box, from the included document sample.
It should have been the "All The Cross_Sell Boxes:" section that I pasted.
After swapping that it worked instantly for my additional product types.
Very happy.
Hi,
I think (hope) I followed the instrictions, but when I go to Admin->Catalog->Multi Cross Sell, and click "install" I get this:
"WARNING: An Error occurred, please refresh the page and try again."
I believe it has to do with localisation, the admin language is Italian, and "Multi Cross Sell" does not show up under Admin->Catalog, when I switch to English it does, so I can click on "install" to get the above error, when I switch back to Italian from the "install" page I do see the "HEADING_TITLE" (I know all I need is to translate that in the defines).
I think of the language as the issue since I had a similar problem with another plugin, which was solved by the author addressing the language in the installation file; could it be the same with Multi Cross Sell, or is it caused by something else?
In both cases will you please assist me?
Thank you.
Thank you very much. Sorry I hadn't gone thru all the thread, my bad.
It works fine now.
In the docs I see reference to Admin->Catalog->Advanced Cross-Sell, which I don't see - most probably I am missing something obvious - and honestly I don't have it very clear what is the difference; will you please help me get it.
Thank you again.
Thank you.
Since I was translating this to Italian, I thought to edit YOUR_RENAMED_ADMIN/multi_xsell.php in order to make it easy for people to localize it by adding the defines.
I attach a copy for you, if you think could be worth for the next update; in case double check the files - they do work on my Zen Cart.
In thes setup using this I have a superuser (administrator), and a second user profile, for the latter I have enabled the access to catalog>>cross sell, and configuration>>cross sell settings, but when trying to access catalog>>cross sell I get the following:
"Sorry, your security clearance does not allow you to access this resource.
Please contact your site administrator if you believe this to be incorrect.
Sorry for any inconvenience."
No problem in accessing configuration>>cross sell settings
Thank you.
Thank you, I appreciate your patience.
I know a few people have asked how to get the cross sells to show in the shopping cart, so I thought I'd post a solution. I didn't write this from scratch, just made a few changes to an old mod (Upsells/Cross Sells in Shopping Cart). I've only tested this on v1.5.1.
Create a new file: includes/modules/YOUR_TEMPLATE/cart_upsell.php with this code:
Add this to your includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart.php file wherever you want the cross sells to show up:Quote:
<?php
if (!defined('MAX_DISPLAY_XSELL')) define('MAX_DISPLAY_XSELL',6);
if (!defined('MIN_DISPLAY_XSELL')) define('MIN_DISPLAY_XSELL',1);
if (!defined('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS')) define('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS',3);
if ($_SESSION['cart']->contents) {
$i = 0;
foreach($_SESSION['cart']->contents as $id => $qty) {
$prod[$i] = zen_get_prid($id);
$i++;
}
$cross_sell = 1;
//check if cross_sell module installed
if (@file_exists(DIR_WS_MODULES . zen_get_module_directory('multi_xsell_products.php'))) {
$c = MAX_DISPLAY_XSELL;
$num = round($c/sizeof($prod));
$extra = $num + 1;
$max = $c;
for ($i = 0; $i < sizeof($prod); $i++) {
if ($i < sizeof($prod) - 1) {
$cross_sell_sort_by = XSELL_SORT_ORDER . $mxsell=="sort_order"?" order by xp.sort_order asc ": " order by rand() ";
$cross_sell_query_raw .= "(select p.products_id, p.products_image
from " . TABLE_PRODUCTS_MXSELL . $cross_sell . " xp, " .
TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $prod[$i] . "'
and xp.xsell_id = p.products_id
and p.products_id = pd.products_id
and pd.language_id = '" . $_SESSION['languages_id'] . "'
and p.products_status = 1 " .
$cross_sell_sort_by." limit " . MAX_DISPLAY_XSELL . ") UNION ";
$c -= $num;
} else {
$c += 2;
$cross_sell_sort_by = XSELL_SORT_ORDER . $mxsell=="sort_order"?" order by xp.sort_order asc ": " order by rand() ";
$cross_sell_query_raw .= "(select p.products_id, p.products_image
from " . TABLE_PRODUCTS_MXSELL . $cross_sell . " xp, " .
TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $prod[$i] . "'
and xp.xsell_id = p.products_id
and p.products_id = pd.products_id
and pd.language_id = '" . $_SESSION['languages_id'] . "'
and p.products_status = 1 " .
$cross_sell_sort_by." limit " . MAX_DISPLAY_XSELL . ")";
}
}
$cross_sell_query = $db->Execute($cross_sell_query_raw);
$db->Execute("create temporary table cross_sell ( products_id int(11), products_image varchar(64) )");
while (!$cross_sell_query->EOF) {
$db->Execute("insert into cross_sell values('" . $cross_sell_query->fields['products_id'] . "', '" . $cross_sell_query->fields['products_image'] . "')");
$cross_sell_query->MoveNext();
}
for ($i = 0; $i < sizeof($prod); $i++) {
$db->Execute("delete from cross_sell where products_id = '" . $prod[$i] . "'");
}
$cross_sell_query_final = "select * from cross_sell limit " . $max;
$cross_sell_final = $db->Execute($cross_sell_query_final);
$db->Execute("drop table cross_sell");
$num_products_cross_sell = $cross_sell_final->RecordCount();
if ($num_products_cross_sell >= MIN_DISPLAY_XSELL) {
$row = 0;
$col = 0;
$list_box_contents = array();
$title = '';
if ($num_products_cross_sell < SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS==0) {
$col_width = floor(100/$num_products_cross_sell);
} else {
$col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS);
}
while (!$cross_sell_final->EOF) {
if (zen_has_product_attributes($cross_sell_final->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
$lc_button = '<br /><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), '&products_id=' . $cross_sell_final->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a><br />';
} else {
$lc_button = '<br /><a href="' . zen_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>';
}
$cross_sell_final->fields['products_name'] = zen_get_products_name($cross_sell_final->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsCrossSell centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<div class="listingProductImage" style="margin-top: 5px; margin-bottom: 5px;"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $cross_sell_final->fields['products_image'], $cross_sell_final->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>'. (constant(CROSS_SELL.$cross_sell._DISPLAY_NAME)=='true'? '<div class="itemTitle"><h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . $cross_sell_final->fields['products_name'] . '</a></h4></div>':'').(constant(CROSS_SELL.$cross_sell._DISPLAY_MODEL)=='true'? '<div class="itemModel"><h4 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($cross_sell_final->fields['products_id']), 'products_id=' . $cross_sell_final->fields['products_id']) . '">' . zen_products_lookup($cross_sell_final->fields['products_id'], 'products_model') . '</a></h4></div>':'').(constant(CROSS_SELL.$cross_sell._DISPLAY_PRICE)=='true'? '<div class="price">'.zen_get_products_display_price($cross_sell_final->fields['products_id']).'</div>':'') .(constant(CROSS_SELL.$cross_sell._DISPLAY_BUY_NOW)=='true'? '<div class="listingBuyNowButton">'.$lc_button.'</div>':'') );
$col ++;
if ($col > 2) {
$col = 0;
$row ++;
}
$cross_sell_final->MoveNext();
}
$cross_sell_data = $list_box_contents;
?>
<br class="clearBoth">
<div class="centerBoxWrapper" id="crossSell">
<?php
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
?>
</div>
<?php
}
}
}
?>
That's it!Quote:
<?php require(DIR_WS_MODULES . zen_get_module_directory('cart_upsell.php')); ?>
What a great day. I've been searching for this fix for so long.
Completely appreciate you taking the time to post this solution.
(Might be good to pack for the Plugins section)
Any idea how I might add a line of text above the xsells on the shopping cart page, that says "We thought you might like to add..."?
I'm concerned people might think they're checking out with the item I'm recommending, instead of what they added to cart.
Or even a horizontal rule to separate...
Again, much appreciated!
Sure, just put this in the shopping_cart.tpl file:
That's not the cleanest way to do it, but it will work for now. When I have a chance I will package it up as a mod and add language definitions, etc.Quote:
<h2>You May Also Like...</h2>
<hr/>
<?php require(DIR_WS_MODULES . zen_get_module_directory('cart_upsell.php')); ?>
Brilliant :)
Hi does this module work with 1.5.3?
Regards
Paul
any idea on the timing for the testing as it is a good module?
Regards
Paul
Hey guys can I ask is cross sell the same as linking pages in the eyes of google or not ..Just wondering that's all as a lot of my products are used in this way
thanks
I am having an odd problem with this mod. Not sure when it started, but I noticed today that Cross Sell is not showing on the product page. I uninstalled/re-installed, added the display code to default template and switched templates in Admin, but it's still a no-show. Any ideas as to what may be causing this?
I saw the tip on how to put xsell items on cart page, upsell style. did anybody create a complete solution? It works to just display xsell item pictures below the cart but the Cross Sell Settings in admin like price or buy now button do not show up. Anybody done that?
Hi there...sorry for the lack of info:
Zen Cart Version 1.5.1
PHP Version 5.4.37
MultiCross Sell Version 1.03
The site link is: http://kwagentassist.com/index.php?m...roducts_id=184
The site is currently undergoing another problem which you may see when you visit. I am working on that one too.
Thanks, :)
On that page, aren't 'Bronze w/MLS/KWLS Entry' and 'Bronze w/MLS/KWLS Listing Entry & Property Photos or IPSAH Video' the xsell items? The box title does not display because you have it hidden via css using display: none on line 560. The text is also white, which you'll need to change once you un-hide it.
Hi, does anybody know, how to install this module to 1.5.4 version? If I click in admin/multi_xsell.php to INSTALL, system allways write "WARNING: An Error occurred, please refresh the page and try again."
Thank you
Does this means that even if the "Just another Cross-Sell" module as being compatible with ZC 1.5+ we can install it and then install "Multi Cross Sell" mod and it will work?Quote:
PS: Working on a zen 1.5.4 update at the moment
Sorry I am confused, can you clarify?
"Just another Cross-Sell" module is NOT compatible with ZC 1.5+ ??
While the current version of "Multi Cross Sell" will "work" on ZC 154
A number of improvements in ZC 154 will be "overwritten" if using this current version.
I have it working fine on ZC 154, just need to find time to document, and tidy it up
Yes, I'm confused just because for this module to work you have to have installed "Just another Cross-Sell" module. Isn't that true?
OH! OH! OH! OK!!! :P
Great to know, I thought I read somewhere you needed to install one to use the other. :huh:
Hello Gilby when will the updated version for zen cart 1.5.4 be available?
I was using Ultimate Cross Sell for Zen Cart however the arthur has abandoned development so I'm looking at your version as a replacement. With Ultimate Cross Sell version I only used the related sidebox feature and I'm not seeing a sidebox in yours was wondering if that could be added? Also I wanted to import my database of related items, will that be possible with your version (meaning if I manually import my database table for related items into the table your uses is the format the same with your version)
I installed all the files of multi cross sell 1.03.
When I go to Go to Admin->Catalog-> there is no Multi Cross Sell option to Click Install
Zen cart verison 1.5.3
I've done the installation once more to another site which uses zencart 1.5.1 without a problem.
Any ideas?
Thank you so much for the quick response.
I checked the installation again and all the files were missing. As if I didn't install anything at all. I copied everything again today and it worked immediately.
I have also incorporated the change of post 291 in the installation files.
Thanks again.
PS. I wonder what happened with my last nights installation.
Got "WARNING: An Error occurred, please refresh the page and try again." in Admin->Catalog->Multi Cross Sell. Any ideas?
I use with 1.5.4 relase, and all works well. But only "Superuser" can works with this addon? Because I've try with other admin profiles, with no success!
See Post# 338 for the fix
Check Post# 291 and see if that helps?
Hi,
That fix didn't work for me. Well, it worked because I have STRICT_ERROR_REPORTING and was giving me the installation error but after getting rid of that error now it's saying:
It's also giving me a similar error when trying to restore using DrByte's MySql Backup module:Quote:
1366 Incorrect integer value: '' for column 'configuration_group_id' at row 1
in:
[INSERT INTO zen_configuration_group VALUES ('', 'Cross Sell Settings', 'Set Cross Sell Options', '1', '1')]
I have this module installed on my store in same server, with same parameters:Quote:
1366 Incorrect integer value: '' for column 'configuration_id' at row 1
in:
[insert into zen_configuration values ('', 'Last Database Restore', 'DB_LAST_RESTORE', 'db_name-20160711061243.sql.gz', 'Last database restore file', '6', '', '', now(), '', '')]
Zen Cart Version 1.5.4
Apache Version 2.4.18
PHP Version 5.6.22
MySQL Version 5.5.50-cll
Your MySQL is apparently configured to disallow the (old) use of an empty string to denote a 0 value. In the past we got away with using '' or 0 or null to trigger an autoincrement field, but newer MySQL versions (depending on their configuration) disallow the string option.
So simply changing that first '' to null should work. Sometimes 0 will still work.
ie:
Code:INSERT INTO zen_configuration_group VALUES (null, 'Cross Sell Settings', 'Set Cross Sell Options', '1', '1')
I don't know exactly what you want me to do here.
This is what I tried:
-Do the upload of the file for multi cross sell to have to button to install module = Same result
-Did the install and did a query at phpadmin as you put it there. It showed up on database but doesn't show up on admin and the installation button gives same error.
-The backup module gives same error when restoring.
I was just pointing out that the SQL you're executing has a syntax error because your MySQL server's configuration is (appropriately) enforcing a modern mode of strictness.
I wasn't telling you to do anything. Just showing you an explanation of what one could do to the code to fix the error.
I'm currently testing to update website to ZC Ver. 1.5.6
However, as I am trying to install Multi Cross Sell. I run into error when I tried to update configuration in admin.
(Configuration -> Cross Sell Settings)
Try to change anythings and I will get into this error in the log...
So, the SQL is not valid.Code:[03-Jan-2019 19:12:24 UTC] Request URI: /zc156/adm/configuration.php?gID=43&cID=916&action=save, IP address: xxx.xxx.xxx.xxx
#1 trigger_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/user/public_html/zc156/adm/configuration.php:26]
--> PHP Fatal error: 1054:Unknown column 'val_function' in 'field list' :: SELECT val_function FROM configuration WHERE configuration_id = '916' ==> (as called by) /home/user/public_html/zc156/adm/configuration.php on line 26 <== in /home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php on line 171.
I ran in PhpMyAdmin and I got same result...
I check configuration.php on admin file. It seems the problematic line is on this part...Code:SQL query: Documentation
SELECT val_function FROM configuration WHERE configuration_id = '916' LIMIT 0, 25
MySQL said: Documentation
#1054 - Unknown column 'val_function' in 'field list'
This part is on ZC 1.5.6 and that code was NOT work like that in ZC 1.5.1 (my current store version).Code:$configuration_value = zen_db_prepare_input($_POST['configuration_value']);
// See if there are any configuration checks
$checks = $db->Execute("SELECT val_function FROM " . TABLE_CONFIGURATION . " WHERE configuration_id = '" . (int)$cID . "'");
if (!$checks->EOF && $checks->fields['val_function'] != NULL) {
require_once('includes/functions/configuration_checks.php');
zen_validate_configuration_entry($configuration_value, $checks->fields['val_function']);
}
I do not think "val_function" exist anywhere in database... and it is hard coded there. I wonder is this intended for other functions or not?
-PanZC2020
Found out it is the bug for 1.5.6, which is now has a hotfix.
https://www.zen-cart.com/showthread....46#post1352546
So that's a new field for 1.5.6. Good to know!
Otherwise, this one seems to work on admin side. Have to test it out. (Beside it's outdated looks on settings...)
Hello everyone, I love this mod and have been using it for long time,
I have one concern if anybody can advise me :
I noticed the multi cross sale products' links are missing the "cPath" variable, and reads like
https://domain.com/index.php?main_pa...&products_id=1
it suppose to be like:
https://domain.com/index.php?main_pa...&products_id=1
As the search bot may take this as duplicate content.
Is there any way to include the cPath variable in the final link? Is there any file I can modify to reach the goal?
In a standard zen-cart the "canonical link" removes the cpath as with linked products there will be several ways to get to the same product.
This would create "duplicate product" warnings as it is the same product, just different ways to get there.
Zen-cart normally "removes the cPath from all "canonical links" so that these "duplicate products" will be seen to actually be the same products as they will all have the same canonical link.
Multi Cross Sell goes straight to the "normally" correct canonical link as this mod has no way of knowing what multiple cPath you want to use to get there.
I notice your website does include the cPath in the canonical link. This is NOT usual Zen-cart behaviour (it is optional however) So your website will already be creating duplicate products for linked items.
Hi,
I am running V1.5.5e and have been using Multi Cross sell for some time now. I was not paying attention to my logs and now have seen that it is and has been throwing an error for some time now. I am not sure why as all is working correctly, and am wondering if someone knows what this error is and how to fix it. Here is the error message in the Debug log:
PHP Warning: constant(): Couldn't find constant TEXT_MXSELL1_PRODUCTS in /home/public_html/shop/includes/templates/**MyTemplate/templates/tpl_modules_multi_xsell_products.php on line 30
Thanks in advance for any help you can offer,
Jeff
Hi Gilby,
Thanks for your reply. I only have English as a language and my PHP version is 7.1.9 I hope that this helps to eliminate some potential ideas......do you happen to have any other things I could check?
I see that this module you have done shows compatibility of v1.5.0, as I have Multi Cross Sell v 1.03. Would this be causing any issues??
Thanks again,
Jeff
Hi Gilby,
Sorry that I did not answer your question earlier on the language file, but I see that I have not placed that file in the correct folder......I have it in includes/languages/english/My Template.
Thank you for deciphering my obvious error. Now that I have this in the correct folder, I am assuming that this should stop the error as now it should be able to find it. I will let you know if I experience any further errors.
Thanks again for helping....it is much appreciated.
Jeff
Hello, after updating to 1.5.6c the module is still working.
Products all show correctly as before (1000s of them)
However, when viewing existing cross sells, the first item is not in the list, always.
(Example shown)
It is showing in the row of comma separated ids, but not in the other area, so I can't delete or change sort order.
Any ideas why the first isn't showing?
First number is main item, other 3 are linked items.
But further down the image there are only 2 linked showing.
Attachment 18941