Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Cross Sell (X-Sell) Admin


dreamscape

Recommended Posts

For WI Benjamin's "Cross Sell Module."

 

This mod is an admin section for the Cross-Sell (X-Sell) module. It was taken from a Cross Sale module and changed to work with Cross-Sell (X-Sell).

 

The original code of this mod is in no way mine. I have merely updated the admin for "Cross Sale" to work with "Cross-Sell (X-Sell)". I like the catalog side of X-Sell better and wanted an admin for it, so I took the one for "cross sale" and updated it to work with X-Sell.

 

I know this mod is not the greatest or easiest to use. When time allows, I may find time to update it to be more user friendly.

 

http://www.oscommerce.com/community/contributions,1005

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

just a small note, anyone running a version of PHP older than v4.1.0 will have to do a search to find $_POST and replace with $HTTP_POST_VARS. There are 11 occurances of it in admin/xsell_products.php for those running old PHP versions.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Man, Joshua, you are SOOO backwars compatible.

 

:lol:

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

*backwards

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Joshua;

 

You don't happen to have an URL that shows the X-sell mod in use, do you? I'm using Cross-sell and would be interested in seeing the difference.

 

Thanks!

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Joshua;

 

You don't happen to have an URL that shows the X-sell mod in use, do you? I'm using Cross-sell and would be interested in seeing the difference.

 

Thanks!

 

Cross-Sell = X-Sell :)

 

there was a Cross Sale (not Cross Sell) posted quite some time ago that had an admin, but not as nice of a catalog module. I just took the admin from the Cross Sale and changed it to work with the Cross-Sell (X-Sell).

 

to be sure, this is the module that the admin was altered for:

http://www.oscommerce.com/community/contri...ions,334/page,3

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Man, Joshua, you are SOOO backwards compatible.

 

:lol:

 

I dunno what u mean here... if u mean the coding for the admin, I didn't write it... I just altered the queries so that it would work with the Cross-Sell module... it came from another cross sale module that was posted in the forums quite some time ago (was never contributed).

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Some X-Sell observations:

 

If you want buy_now buttons, be sure to do them like this:

<form name="buy_now_' . $xsell['products_id'] . '" method="post" action="' . tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params(array('action')) . 'action=buy_now', 'NONSSL') . '"><input type="hidden" name="products_id" value="' . $xsell['products_id'] . '">' . tep_image_submit('button_buy_now.gif', 'Buy ' . $xsell['products_name'] . ' Now!') . '</form>

 

It would be useful if products without X-Sell relationships defaulted to something. Say the top 3 Best Sellers in that product's category?

 

- Greg

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

Link to comment
Share on other sites

It would be useful if products without X-Sell relationships defaulted to something. Say the top 3 Best Sellers in that product's category?

 

- Greg

 

that would only work out good if there were only 4 to 10 products per category.... and hey some of us have the "bestsellers" show the actual bestsellers :wink:

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

what's x-sell??

 

cheers

emiliano

 

X-sell = "cross sell"... its called cross sell the in the contribution list, but inside the contribution, it refers to istelf as X-Sell... basically it adds another box on product_info.php similar to the "also purchased" boxed... but u can pick what goes there... it is an "also reccomended" box basically.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

 

I haven't tried it on exsisting installs... I got an email the other day froma guy and told him to completely drop the table and re-create it... that seemed to work for him...

 

run this SQL query and try the admin again:

DROP TABLE IF EXISTS products_xsell;

CREATE TABLE products_xsell ( 

ID int(10) NOT NULL auto_increment,

products_id int(10) unsigned NOT NULL default '1', 

xsell_id int(10) unsigned NOT NULL default '1', 

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY  (ID)

) TYPE=MyISAM;

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

 

I haven't tried it on exsisting installs... I got an email the other day froma guy and told him to completely drop the table and re-create it... that seemed to work for him...

 

run this SQL query and try the admin again:

DROP TABLE IF EXISTS products_xsell;

CREATE TABLE products_xsell ( 

ID int(10) NOT NULL auto_increment,

products_id int(10) unsigned NOT NULL default '1', 

xsell_id int(10) unsigned NOT NULL default '1', 

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY  (ID)

) TYPE=MyISAM;

 

I have done this, and reinstalled everytinh sbout 10 times!!

 

OMG - What the hell is wrong?

Link to comment
Share on other sites

I have done this, and reinstalled everytinh sbout 10 times!!  

 

OMG - What the hell is wrong?

 

Calm down man!

 

It aint that bad, small bugs can be ironed out.

And this is a very small addition which can be indone if it doesnt work for you, so chill...

 

I am gonna add this to my test server and see if I get any probs.

Will let you know shortly.

 

CC.

 

P.S. I hope you did the first step of every new mod...

BACKUP?

Link to comment
Share on other sites

and i went to your example site and didn't notice a differnce with the items that were using cross-sell..  is there somewhere I could see exactly what this looks like?   :D

 

this thread is about an admin for cross-sell (X-sell)... not about the cross sell module itself... questions about that should be directed to the author or started in a new thread... I don't mean to sound, well mean, but all these postings about the cross-sell module are starting to make this thread confusing and hard to read... hell I'm confused now. :D

 

It is installed on my site, but its not live yet... if u can wait like a week, I will post it, and u can see the cross-sell module.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

 

I haven't tried it on exsisting installs... I got an email the other day froma guy and told him to completely drop the table and re-create it... that seemed to work for him...

 

run this SQL query and try the admin again:

DROP TABLE IF EXISTS products_xsell;

CREATE TABLE products_xsell ( 

ID int(10) NOT NULL auto_increment,

products_id int(10) unsigned NOT NULL default '1', 

xsell_id int(10) unsigned NOT NULL default '1', 

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY  (ID)

) TYPE=MyISAM;

 

I have done this, and reinstalled everytinh sbout 10 times!!

 

OMG - What the hell is wrong?

 

it should work fine... unless you are running an older PHP version, in which case you will need to search through admin/xsell_products.php for $_POST and replace it with $HTTP_POST_VARS

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

and i went to your example site and didn't notice a differnce with the items that were using cross-sell..  is there somewhere I could see exactly what this looks like?   :D

 

this thread is about an admin for cross-sell (X-sell)... not about the cross sell module itself... questions about that should be directed to the author or started in a new thread... I don't mean to sound, well mean, but all these postings about the cross-sell module are starting to make this thread confusing and hard to read... hell I'm confused now. :D

 

It is installed on my site, but its not live yet... if u can wait like a week, I will post it, and u can see the cross-sell module.

 

Oooooooh you big meanie you! :lol: :wink:

 

CC.

Link to comment
Share on other sites

Dropping the existing table did the trick for me, though I'm not too wild about the prospect of adding all of the products back in. :? eh - it's a good chance to review/rethink/clean-up my associations.

 

Perhaps X-Sell should be re-released with this addon? I'm sure I'll be making some interface improvements. I'll post any here...

 

Thanks,

 

Greg

Link to comment
Share on other sites

Just wanted to let all of you that don't already know this in on another contribution available. It is, in my personal opinion, a little bit easier to use than x-sell, the admin is simple, and it is not nearly as time consuming at x-sell.

 

With Family Products, you simply assign all of your products to a "family" and your realted products show up in an infoBox on the prouct_info.php page. You only have to assign a "family" once to each product. In x-sell I believe you have to assign every single relationship.

 

For those of you who are interested, you can find it here: http://www.oscommerce.com/community/contri...ions,895/page,2

 

I hope this helps,

-Chris

Chris Sullivan

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

 

I haven't tried it on exsisting installs... I got an email the other day froma guy and told him to completely drop the table and re-create it... that seemed to work for him...

 

run this SQL query and try the admin again:

DROP TABLE IF EXISTS products_xsell;

CREATE TABLE products_xsell ( 

ID int(10) NOT NULL auto_increment,

products_id int(10) unsigned NOT NULL default '1', 

xsell_id int(10) unsigned NOT NULL default '1', 

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY  (ID)

) TYPE=MyISAM;

 

I have done this, and reinstalled everytinh sbout 10 times!!

 

OMG - What the hell is wrong?

 

it should work fine... unless you are running an older PHP version, in which case you will need to search through admin/xsell_products.php for $_POST and replace it with $HTTP_POST_VARS

 

Nope im running PHP4.23!!

Link to comment
Share on other sites

HELP!!

 

I cant get the admin side to work!!

 

When I assagin one product to another....

I dosent do it and then when I go and do it again, I get an error that theres a duplicat key.

 

But in catalog it still dont work either!!

 

 

:shock:

 

I haven't tried it on exsisting installs... I got an email the other day froma guy and told him to completely drop the table and re-create it... that seemed to work for him...

 

run this SQL query and try the admin again:

DROP TABLE IF EXISTS products_xsell;

CREATE TABLE products_xsell ( 

ID int(10) NOT NULL auto_increment,

products_id int(10) unsigned NOT NULL default '1', 

xsell_id int(10) unsigned NOT NULL default '1', 

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY  (ID)

) TYPE=MyISAM;

 

I have done this, and reinstalled everytinh sbout 10 times!!

 

OMG - What the hell is wrong?

 

it should work fine... unless you are running an older PHP version, in which case you will need to search through admin/xsell_products.php for $_POST and replace it with $HTTP_POST_VARS

 

Nope im running PHP4.23!!

 

 

YEY - I got it working!! - Alls that I did is drop the tableand recreate it about 3 times - WIERD!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...