Forums / All Other Contributions/Addons / Multi Cross Sell mod [Support thread]

Multi Cross Sell mod [Support thread]

Views: 85,316

Results 21 to 40 of 476
10 Jul 2010, 12:39 AM
#21
andreitero avatar

andreitero

Zen Follower

Join Date:
Dec 2009
Posts:
207
Plugin Contributions:
0

Multi Cross Sell mod [Support thread]

gilby:

Quick fix to use the first XSELL database and hard code it
Cannot try it myself but it looks right

$xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_XSELL1 . " 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_XSELL1);


Did not go as expected, I can see the TABLE_PRODUCTS_XSELL1 in PhpmyAdmin, but it still throws this error:

1146 Table 'lemycouk_zc1.TABLE_PRODUCTS_XSELL1' doesn't exist
in:
[select distinct p.products_id, p.products_image, pd.products_name from TABLE_PRODUCTS_XSELL1 xp, zen_products p, zen_products_description pd where xp.products_id = '42' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit 6]


Do you have any other suggestions i should try?
Thanks for taking the time.
10 Jul 2010, 1:33 AM
#22
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

andreitero:

Did not go as expected, I can see the TABLE_PRODUCTS_XSELL1 in PhpmyAdmin, but it still throws this error:

1146 Table 'lemycouk_zc1.TABLE_PRODUCTS_XSELL1' doesn't exist
in:
[select distinct p.products_id, p.products_image, pd.products_name from TABLE_PRODUCTS_XSELL1 xp, zen_products p, zen_products_description pd where xp.products_id = '42' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit 6]

> 
> Do you have any other suggestions i should try?
> Thanks for taking the time.

Ahh.. Try this one:

$xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_MXSELL1 . " 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_XSELL1);

10 Jul 2010, 4:03 AM
#23
justin2010 avatar

justin2010

New Zenner

Join Date:
May 2010
Posts:
52
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

I managed to install it and started the test. It works great and it's exactly what I am looking for in terms of the functions.

One quick question. There are only 5 cross sells I can use by default. Is it possible I can have more than 5?

Thanks you!

10 Jul 2010, 4:24 AM
#24
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

justin2010:

I managed to install it and started the test. It works great and it's exactly what I am looking for in terms of the functions.

One quick question. There are only 5 cross sells I can use by default. Is it possible I can have more than 5?

Thanks you!

Certainly.

Edit: admin\includes\functions\extra_functions\multi_xsell.php
around line 237 you will find this partial code segment...
array('1', '2', '3', '4', '5')
Edit and expand that to however many you want.

Also edit: includes\languages\english\extra_definitions\YOUR_TEMPLATE\multi_xsell_box_defines.php
Add definitions for the extra headings here.

Then uninstall and reinstall from the admin (the cross sell databases will not be removed)

10 Jul 2010, 6:08 AM
#25
justin2010 avatar

justin2010

New Zenner

Join Date:
May 2010
Posts:
52
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Thank you for your quick reply, gilby.

Well, you are not going to believe this. I modified these 2 files and upload them to their location. Then when I tried to go to my admin page to login, I got a "HTTP 500" error! The store is still working fine for customers so far. I just can't access to the admin login page. I checked the files on the hosting server, and it doesn't look like it's been hacked or what so ever. Lucky, this is just a test site.

It's late now. I will try and figure out tomorrow. Thank you!

10 Jul 2010, 11:13 PM
#26
justin2010 avatar

justin2010

New Zenner

Join Date:
May 2010
Posts:
52
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Finally, I set everything right.

Here are something to share with:

  1. BACKUP!!!!!!!!!!!!!
    Before you upload the mod files, BACKUP! I probably mess up some file(s) last night :oops:, that's why I got the HTTP 500. Then I tried to fix the files and the xsell tables, but it took more time and efforts and it got more confusing :frusty:, so eventually I erased everything including the public_html and DBs, and used my backup copies to restore the whole store, including files and DBs, and carefully uploaded the Multi Cross mod again. This time it works without any problems. :clap:

  2. a little correction to the README file.
    In the README file, it says "Go to Admin->Configuration->Multi Cross Sell
    Click Install
    Go to Admin->Configuration->Cross Sell Settings
    By default one cross sell is installed
    Configure as required.

But I found it, in my case, is actually under "Admin->Catalog->Multi Cross-Sell" to click the "install", then the "Admin->Configuration->Cross Sell Settings" will show up. If this is also true to the developer and others, please modify the README file.

  1. some suggestions to the developer(s)
    --by default, it uses "Product models" instead of "product id", I am sure there must be a reason but I think the product id is definitely unique while product models could be the same. I prefer id over model.
    --how about provide an option for the admin to delete a cross-sell and drop the table? If I want to completely get rid of a cross-sell for whatever business reasons, then to delete that cross-sell and drop the whole table is easy and fast.

In general, this is a good module to help promoting sale. All it need is to carefully set it up. Thank you for the great work! :clap:

12 Jul 2010, 12:23 AM
#27
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

justin2010:

Finally, I set everything right.

Here are something to share with:

  1. BACKUP!!!!!!!!!!!!!
    Absolutely: Never install a mod on a live website.
    Always test first on a test website.
    Particularly if you are also altering the mod.

justin2010:

  1. a little correction to the README file.
    In the README file, it says "Go to Admin->Configuration->Multi Cross Sell
    Click Install
    Go to Admin->Configuration->Cross Sell Settings
    By default one cross sell is installed
    Configure as required.

But I found it, in my case, is actually under "Admin->Catalog->Multi Cross-Sell" to click the "install", then the "Admin->Configuration->Cross Sell Settings" will show up. If this is also true to the developer and others, please modify the README file.
Yes, thanks for catching that typo. It will be corrected in the next version.

justin2010:

  1. some suggestions to the developer(s)
    --by default, it uses "Product models" instead of "product id", I am sure there must be a reason but I think the product id is definitely unique while product models could be the same. I prefer id over model.
    --how about provide an option for the admin to delete a cross-sell and drop the table? If I want to completely get rid of a cross-sell for whatever business reasons, then to delete that cross-sell and drop the whole table is easy and fast.
    "Products model number" as default worked for me as all my model numbers are unique.
    If your model numbers are not unigue then the admin functions may not work as expected.
    I have used both ways on my sites. It depends on the situation at the time.
    However only use the model number way if you have unigue model numbers. Product ID's are always unique.

If there is enough demand for that feature I will look at the abilty to empty a single cross sell table.

12 Jul 2010, 7:37 PM
#28
sgflowers avatar

sgflowers

Totally Zenned

Join Date:
Jan 2004
Posts:
508
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

gilby:

I suspect you still have some of the previous mods files or configuration settings.

You can run this in the tools->sql patches to remove the previous mods configuration settings
after BACKING UP AND TESTING FIRST of course

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;

> 
> Check that all the previous mods files have been removed

hi i am having this issue

i updated from 1.3.7 to 1.3.9d with a fresh install on the files
i ran the above sql to remove the old cross sell but i still get an error

any ideas?

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 '' at line 7
in:
[select distinct p.products_id, p.products_image, pd.products_name from zen_products_xsell1 xp, zen_products p, zen_products_description pd where xp.products_id = '1852' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit ]

12 Jul 2010, 8:13 PM
#29
sgflowers avatar

sgflowers

Totally Zenned

Join Date:
Jan 2004
Posts:
508
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

sgflowers:

hi i am having this issue

i updated from 1.3.7 to 1.3.9d with a fresh install on the files
i ran the above sql to remove the old cross sell but i still get an error

any ideas?

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 '' at line 7
in:
[select distinct p.products_id, p.products_image, pd.products_name from zen_products_xsell1 xp, zen_products p, zen_products_description pd where xp.products_id = '1852' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit ]


any idea what files i should be looking at to figure this out??
12 Jul 2010, 10:09 PM
#30
kconklin avatar

kconklin

New Zenner

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

Re: Multi Cross Sell mod [Support thread]

This is so great!! I did not have the sample file uploaded once I did and then renamed it everything worked great!! Thanks so much for your help! This is a great module:thumbsup:

13 Jul 2010, 12:00 AM
#31
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

sgflowers:

any idea what files i should be looking at to figure this out??

I am assuming you had a previous cross sell installed??
Almost certainly some of the previous mods configuration values are still there.

Search the configuration table for configuration_key = "MAX_DISPLAY_XSELL"
And delete this entry.

While you at it see if "MIN_DISPLAY_XSELL" is also there and delete it as well

13 Jul 2010, 12:46 AM
#32
sgflowers avatar

sgflowers

Totally Zenned

Join Date:
Jan 2004
Posts:
508
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

gilby:

I am assuming you had a previous cross sell installed??
Almost certainly some of the previous mods configuration values are still there.

Search the configuration table for configuration_key = "MAX_DISPLAY_XSELL"
And delete this entry.

While you at it see if "MIN_DISPLAY_XSELL" is also there and delete it as well

Thanks that fixed it - it was driving me nuts!:clap:

15 Jul 2010, 2:51 AM
#33
anworks avatar

anworks

New Zenner

Join Date:
Dec 2007
Posts:
19
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Hello,

I also had a previous version of cross sell installed and I am getting the 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 '' at line 7
in:
[select distinct p.products_id, p.products_image, pd.products_name from zen_products_xsell1 xp, zen_products p, zen_products_description pd where xp.products_id = '66' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit ]

I have gone through all the posts and sugestions but have not been able to find any files from previous versions or anything in the database. Anyone have any ideas? :lamo:

15 Jul 2010, 3:47 AM
#34
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

anworks:

Hello,

I also had a previous version of cross sell installed and I am getting the 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 '' at line 7
in:
[select distinct p.products_id, p.products_image, pd.products_name from zen_products_xsell1 xp, zen_products p, zen_products_description pd where xp.products_id = '66' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = 1 order by xp.sort_order asc limit ]

> 
> I have gone through all the posts and sugestions but have not been able to find any files from previous versions or anything in the database.  Anyone have any ideas? :lamo:


Same problem as in Post# 29
Answer is in Post# 31

You will need something like phpmyadmin to search the configuration table for configuration_key = "MAX_DISPLAY_XSELL" 
And then delete it.
16 Jul 2010, 1:59 PM
#35
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Hi gilby,

First of all great mod - I really like the new customisable features you have added :smile:

Just wondering if it is possible to make this compatible with the Tabbed Products Pro module ??

Cheers.

17 Jul 2010, 12:33 AM
#36
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

gaffettape:

Hi gilby,

First of all great mod - I really like the new customisable features you have added :smile:

Just wondering if it is possible to make this compatible with the Tabbed Products Pro module ??

Cheers.

Earlier in this thread someone else tried a hard coded hack to display the first cross sell.
It probably works but makes using this mod pointless as it only uses features of the previous mod.

I am sure TPP can be altered to incorporate this mod.
But as I have never used that mod, it is not on my "to do" list at this time, Sorry

22 Aug 2010, 12:48 PM
#37
briann avatar

briann

New Zenner

Join Date:
Dec 2008
Posts:
28
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

I'd just like to say:

THANK YOU!

for this awesome mod. After a problem with Just Another Cross Sell Mod (again) I tried this one, it's much better!

23 Aug 2010, 9:29 AM
#38
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Hello,

First, i'd like to say this is an awesome mod! Like all the added features.
I was just wondering though, is it possible to show the category the product is from instead of the model?

Thanks

23 Aug 2010, 11:24 AM
#39
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Berserker:

Hello,

First, i'd like to say this is an awesome mod! Like all the added features.
I was just wondering though, is it possible to show the category the product is from instead of the model?

Thanks

Not an available option in the default mod
A quick search of zen functions found this function
zen_get_categories_name_from_product($product_id)
It looks useful
Give it the product id and back comes the name of the category

I haven't tried this but this could work

Edit
\includes\modules\YOUR_TEMPLATE\multi_xsell_products.php
Around line 69 near the end of the line find this code segment

zen_products_lookup($xsell_query->fields['products_id'], 'products_model')

and replace with

zen_get_categories_name_from_product($xsell_query->fields['products_id'])

See if that works for you?

23 Aug 2010, 11:38 AM
#40
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Multi Cross Sell mod [Support thread]

Berserker:

Hello,

First, i'd like to say this is an awesome mod! Like all the added features.
I was just wondering though, is it possible to show the category the product is from instead of the model?

Thanks
I just tested the code in the previous post and it does work