Re: Just another Cross-Sell mod (support thread)
I believe in the original CrossSell mod you need to add certain files into "includes", and edit some other files. Check to make sure that you have it set correctly.
Then in you admin->configuration->cross-sell check this:
You will see that you have 2 settings with the same name "Display Cross-Sell Products" (I should have changed those names, in fact I will do in the next version)
The first "Display Cross-Sell Products" is the minimum number of products required to display cross-sell, make sure you set this to 1
The second is the maximum number, set it to whatever you want (i.e: 8)
Re: Just another Cross-Sell mod (support thread)
I know others have had this question before, but I couldn't find the answer. Lets say I have a max display of 6 xsell items, but I actually assign a larger number, 10 for example. It appears that it xsell will only show the first 6 and not randomly show the 10. Has anyone came up with a solution for this? Or am I doing something wrong.
Thanks
Re: Just another Cross-Sell mod (support thread)
I don't have access to my server now, but it should be something like this:
Edit includes/modules/your_template/xsell_products.php
Replace:
PHP Code:
$xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $_GET['products_id'] . "'
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
order by xp.sort_order asc limit " . MAX_DISPLAY_XSELL);
$num_products_xsell = $xsell_query->RecordCount();
By:
PHP Code:
$xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $_GET['products_id'] . "'
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
order by RANDOM(), xp.sort_order asc limit " . MAX_DISPLAY_XSELL);
$num_products_xsell = $xsell_query->RecordCount();
What I did is that I added the order by random() into the sql query.
Re: Just another Cross-Sell mod (support thread)
Oops, huge mistake, should be rand() instead of random(). Sorryyyy
Re: Just another Cross-Sell mod (support thread)
...........................
Re: Just another Cross-Sell mod (support thread)
Ok, my site is back up so I have the chance to test the query. It works. So you should see the effect you expected.
Re: Just another Cross-Sell mod (support thread)
Hi!
I get some error when i use, Add Product Field Button. I get "error on the site" in the status field. And when I use the new funksion "Cross sell 1 way only" i get the message "Please input main product's model" what have gone wrong.
Regards
Kjetil:wacko:
Re: Just another Cross-Sell mod (support thread)
It'd be great if you can provide a screenshot.
Re: Just another Cross-Sell mod (support thread)
10 statements processed. http://localhost/admin/images/icons/error.gif ERROR: Can not insert configuration_key "", it already existsNote: 1 statements ignored. See "upgrade_exceptions" table for additional details.
..it doesnt work to me....I have cross sell and advanced too. What I did wrong. It happend when I insert your sql script
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Cross Sell';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
INSERT INTO configuration_group VALUES ('', 'Cross Sell', 'Set Cross Sell Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Cross Sell';
UPDATE configuration SET configuration_group_id = @t4 WHERE configuration_key IN ('MIN_DISPLAY_XSELL','MAX_DISPLAY_XSELL','SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUC TS','XSELL_DISPLAY_PRICE');
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
('', 'Input type to be used in form', 'XSELL_FORM_INPUT_TYPE', 'model', 'Choose to use product ID or MODEL as your input type. Check readme file for more info', @t4, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''id'', ''model''),');
Re: Just another Cross-Sell mod (support thread)
If you host your image on your localhost then there is no way I can access it.