Guest Posted March 14, 2005 Posted March 14, 2005 I would like to use this contrib, but I can't figure out how or where to install the products_xsell.sql ?? can anyone enlighten me as to how to go about this. Thanks Quote
assembler Posted May 1, 2005 Posted May 1, 2005 i have installed the xsell_cart contribution and everything is working, but it is not removing items from the xsell_box when they are added to the cart. Can anyone help? <{POST_SNAPBACK}> Do you mean it is not removing them from the xsell in the shopping cart, or the xsell on the products page. Currently, it does not remove products from the list on the product_info page. Quote My Contributions
assembler Posted May 6, 2005 Posted May 6, 2005 I just released a new version of xsell cart. It is much faster, and looks a bit cleaner. I removed the manufacturer information from being displayed. http://www.oscommerce.com/community/contributions,1808 Quote My Contributions
996 Posted February 2, 2006 Posted February 2, 2006 Okay I have the latest version of xsell_cart.php (2.2) admin sections are all working fine. Everything is working fine except the cart part which is the only place I really want to use this. I am getting the following SQL errors: 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 '{2}5 AND px.xsell_id = p.products_id AND px.xsell_id = pd.produ SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM products AS p, products_description AS pd, products_xsell AS px WHERE px.products_id = 348{2}5 AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '1' ORDER BY p.products_ordered DESC [TEP STOP] Anyone else been having this problem? Please let me know. Thanks Rich Quote
kasja2008 Posted May 6, 2006 Posted May 6, 2006 Is there anyone who can help me? My Xsell box is not showing up at all...I have read through many posts but can't find a solution and don't really know what else to do. Myr URL is http://twinsashi.com Thanks! Quote
jimmygreaves Posted July 5, 2006 Posted July 5, 2006 (edited) Okay I have the latest version of xsell_cart.php (2.2) admin sections are all working fine. Everything is working fine except the cart part which is the only place I really want to use this. I am getting the following SQL errors: 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 '{2}5 AND px.xsell_id = p.products_id AND px.xsell_id = pd.produ SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM products AS p, products_description AS pd, products_xsell AS px WHERE px.products_id = 348{2}5 AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '1' ORDER BY p.products_ordered DESC [TEP STOP] Anyone else been having this problem? Please let me know. Thanks Rich Me too, I'm getting this exact same problem - Any ideas clever people????? Edited July 5, 2006 by jimmygreaves Quote
Guest Posted July 5, 2006 Posted July 5, 2006 in the xsell_cart.php change this: $xsell_query = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " AS p, " . TABLE_PRODUCTS_DESCRIPTION . " AS pd, " . TABLE_PRODUCTS_XSELL . " AS px WHERE px.products_id = " . $product_id_in_cart['id'] . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' ORDER BY p.products_ordered DESC"); to this $xsell_query = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " AS p, " . TABLE_PRODUCTS_DESCRIPTION . " AS pd, " . TABLE_PRODUCTS_XSELL . " AS px WHERE px.products_id = " . tep_get_prid($product_id_in_cart['id']) . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' ORDER BY p.products_ordered DESC"); Quote
jimmygreaves Posted July 6, 2006 Posted July 6, 2006 in the xsell_cart.php change this: $xsell_query = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " AS p, " . TABLE_PRODUCTS_DESCRIPTION . " AS pd, " . TABLE_PRODUCTS_XSELL . " AS px WHERE px.products_id = " . $product_id_in_cart['id'] . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' ORDER BY p.products_ordered DESC"); to this $xsell_query = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " AS p, " . TABLE_PRODUCTS_DESCRIPTION . " AS pd, " . TABLE_PRODUCTS_XSELL . " AS px WHERE px.products_id = " . tep_get_prid($product_id_in_cart['id']) . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' ORDER BY p.products_ordered DESC"); Good work that man! Cheers mate, works great now. Quote
daz_75 Posted July 12, 2006 Posted July 12, 2006 I like the look of this compared to the default xsell contrib but when i install it i get no add to car buttons. If this is supposed to be the case and im supposed to use the add to card button on the main product page, that doesn't add any of the xsell products even if they are ticked. Any ideas? Cheers Daz Quote
Guest Posted August 16, 2006 Posted August 16, 2006 So I'm trying figure out how to get started with this contribution? I've installed the latest version of the basic xsell contribution. But I don't see any install instructions for this xsell_cart addition. All of the downloads are single .php files zipped. Can someone point me to the install steps. I'm a little lost. Quote
Guest Posted August 17, 2006 Posted August 17, 2006 So I'm trying figure out how to get started with this contribution? I've installed the latest version of the basic xsell contribution. But I don't see any install instructions for this xsell_cart addition. All of the downloads are single .php files zipped. Can someone point me to the install steps. I'm a little lost. Bump? Quote
Brown Knight Posted August 23, 2006 Posted August 23, 2006 there is an install.txt file with this. what did you download? Quote
Brown Knight Posted August 23, 2006 Posted August 23, 2006 I installed the contribution, can click on the link in the admin, the item selected does show the image in the box however none of the other items show an image, all show 'No Image'. I am using small and large image contribution. The database does have image names listed in the products table, products_image, anyone have any idea why no images are displayed? Quote
newtech Posted December 21, 2006 Posted December 21, 2006 Step 14 is in French for instal of xsell 2.3 Anybody got an English translation? STEP 14:Add to /catalog/admin/includes/functions/general.php //Cache function rdel($path, $deldir = true) { // $path est le chemin relatif au fichier php // $deldir (paramètre optionel, par défaut à vrai) permet de dire si vous souhaitez supprimer le répertoire (vrai) ou le vider uniquement (faux) // on vérifie d'abord que le nom du repertoire contient "/" à la fin, sinon on le lui rajoute if ($path[strlen($path)-1] != "/") $path .= "/"; if (is_dir($path)) { $d = opendir($path); while ($f = readdir($d)) { if ($f != "." && $f != "..") { $rf = $path . $f; // chemin relatif au fichier php if (is_dir($rf)) // si c'est un répertoire on appel récursivement la fonction rdel($rf); else // sinon on efface le fichier unlink($rf); } } closedir($d); if ($deldir) // si $deldir est vrai on efface le répertoire rmdir($path); } else { unlink($path); } } //Fin cache Quote
gabrielthegray Posted January 14, 2007 Posted January 14, 2007 I just installed xsell 2.2...works great...love it. I want to make the images in the admin smaller. I thought I saw something on this thread about that but I found no answer yet. I also tried the 2.2_1 image fix by cyclopes, which seemd perfectly logical, but it did not work. Does anyone have any suggestions? Thanks! Quote
MJP Posted April 10, 2007 Posted April 10, 2007 where's the SQL statement for this contrib? I'm getting a error that TABLE_PRODUCTS_XSELL doesn't exist. Quote
MJP Posted April 11, 2007 Posted April 11, 2007 where's the SQL statement for this contrib? I'm getting a error that TABLE_PRODUCTS_XSELL doesn't exist. solved it. it helps to first install the contrib - X-Sell v2-MS2 - Cross Sell for MS2. Doh! Quote
kunal247 Posted June 14, 2007 Posted June 14, 2007 I like the look of this compared to the default xsell contrib but when i install it i get no add to car buttons. If this is supposed to be the case and im supposed to use the add to card button on the main product page, that doesn't add any of the xsell products even if they are ticked. Any ideas? Cheers Daz I am having the same problem too. Unable to add the items into cart after selecting and clicking on update. Any fix for this available? Kunal Quote
runweb Posted September 13, 2007 Posted September 13, 2007 (edited) In installed the 2.3 contrib of X-Sell and it`s running realy well. But: I have about 1000 items in my webhsop and a lot of X-Sells I´d appreciate the following enhancements: 1.) Add Cross-Sellings to a product by model-number (like in contrib "Fast Easy Cross-Sell") 2.) A search box to search and add Cross Sells 3.) An alphabetical sort Option to add Cross Sell Items (Klick "A" to see all items beginning with "A".....) A realy useful contrib but i hope that some approvements in handling will be done.... ----------------------------------------------------------------------- At last - is there a complete updated package available for this contibution http://www.oscommerce.com/community/contributions,1808 ? i can only find a lot of enhancements and bug fixes.....what about a clean complete package ??? Edited September 13, 2007 by runweb Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1
TracyS Posted March 18, 2008 Posted March 18, 2008 Hello - I've got xsell_cart.php v2 up and running with X-Sell v2-MS2 v2.3 - I only have one glitch - when you add a product to your cart from the xsell_cart listing on the shopping cart page with the "Update" button, it causes the "Continue" button to point to 404.php as you weren't at a product page when you added the item to the cart. Any idea on how to correct this? :huh: The other thing I am hoping for is the ability to change the design to that of the xsell listings on the product pages (3 columns per row). I've been attempting this and so far I've just not managed to get it right. If anyone has gotten this working it would be greatly appreciated if you could either post your code or PM me with it :thumbsup: Thanks!! Quote ~Tracy
Guest Posted January 8, 2010 Posted January 8, 2010 anyone get this to work with v2.6 of xsell? i just want the xsell to show up in my shopping cart. when i add the product, nothing shows up. Quote
aelalfy1989 Posted January 9, 2010 Posted January 9, 2010 Hi I was wondering if someone can help me. I have installed the auto installer for the XSELL (http://addons.oscommerce.com/info/1415) but I'm wondering. My main reason for installing this contribution was to get the cross products to be displayed in the shopping cart. Just for fun I tested it in the products info page and changed it the way we want (in temrs of appearnace) and it worked. I took that and tried to put it in the shopping cart and wasn't able to generate anything. Can someone help me with the code please. Here is my code so far: <?php /* $Id: xsell_products.php, v1 2002/09/11 // adapted for Separate Pricing Per Customer v4 2005/02/24 osCommerce, Open Source E-Commerce Solutions <http://www.oscommerce.com> Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_XSELL_PRODUCTS); $xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price from " . TABLE_PRODUCTS_XSELL . " xp left join " . TABLE_PRODUCTS . " p on xp.xsell_id = p.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' order by sort_order asc limit " . MAX_DISPLAY_XSELL); if (tep_db_num_rows($xsell_query)>= MIN_SIMILAR_PRODUCTS) { ?> <!-- xsell_products //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_PRODUCTS); new contentBoxHeading($info_box_contents); ?> <? tep_draw_heading_top_3();?> <?php $row = 0; $col = 0; $info_box_contents = array(); while ($xsell = tep_db_fetch_array($xsell_query)) { if (tep_not_null($xsell['specials_new_products_price'])) { $xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s><br>'; $xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } else { $xsell_price = '<span class="productSpecialPrice">' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } $xsell['products_name'] = tep_get_products_name($xsell['products_id']); $p_name = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name']. '</a>'; $p_buynow ='<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&product_to_buy_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>'; $xsell_reviews_query = tep_db_query("select r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS . " p where r.products_id = " . (int)$xsell['products_id'] . ""); $xsell_reviews = tep_db_fetch_array($xsell_reviews_query); $xsell_reviews_rating = (($xsell_reviews['reviews_rating'] >= '1') ? tep_image(DIR_WS_IMAGES . 'stars_' . $xsell_reviews['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $xsell_reviews['reviews_rating'])) : tep_image(DIR_WS_IMAGES . 'stars_0.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, '0'))); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => '', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT) . '<br>' . $xsell['products_name'] . '<br>' . $xsell_reviews_rating . '<br>' . $xsell_price. '<br>'.$p_buynow.'</a>'); $col ++; if ($col >= 1) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <? tep_draw_heading_bottom_3();?> </td> </tr> <!-- xsell_products_eof //--> <?php } ?> Thanks in advance, someone somewhere had this xsell_cart.php file that didn't work btw, <!-- xsell_cart //--> <?php // BOF Separate Pricing Per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } global $customer_group_id; //Start an array of items being suggested. $xsell_contents_array = array(); //Start to build the HTML that will display the xsell box. $xsell_box_contents = ''; //Go through each item in the cart, and look for xsell products. foreach ($products AS $product_id_in_cart) { // First we need to get the master_product for the product_id_in_cart $xsell_master_query = tep_db_query("SELECT products_master FROM " . TABLE_PRODUCTS . " WHERE products_id = " . $product_id_in_cart['id'] . ""); $xsell_master = tep_db_fetch_array($xsell_master_query); //Main XSELL Query if ($customer_group_id != '0') { $xsell_query = tep_db_query("SELECT p.products_master, p.products_sort_order, p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, IF(pg.customers_group_price IS NOT NULL, pg.customers_group_price, p.products_price) as products_price FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg using(products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_XSELL . " px WHERE px.products_id = " . $xsell_master['products_master'] . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' AND pg.customers_group_id = '".$customer_group_id."' and find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0 ORDER BY p.products_sort_order ASC"); } else { $xsell_query = tep_db_query("SELECT p.products_master, p.products_sort_order, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_XSELL . " px WHERE px.products_id = " . $xsell_master['products_master'] . " AND px.xsell_id = p.products_id AND px.xsell_id = pd.products_id AND p.products_status = '1' AND pd.language_id = '" . (int)$languages_id . "' AND find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0 ORDER BY p.products_sort_order ASC"); } //Cycle through each suggested product and add to box, if there are none //go to the next product in the cart. while ($xsell = tep_db_fetch_array($xsell_query)) { //If the xsell item is already being suggested, we don't need //to suggest it again. Keep track of xsell items I've already dealt //with. if (!in_array($xsell['products_id'], $xsell_contents_array)) { //Add this xsell product to the list of xsell products dealt with. array_push($xsell_contents_array, $xsell['products_id']); //If a suggested product is already in the cart, we don't need to //suggest it again. if (!$cart->in_cart($xsell['products_id'])) { //Create the box contents. $xsell_box_contents .= '<tr><td class="smallText">Qty: ' . tep_draw_input_field('cart_quantity[]', '', 'size="4"') . tep_draw_hidden_field('products_id[]', $xsell['products_id']) . '</td>'; $xsell_box_contents .= '<td class="smallText" width="' . SMALL_IMAGE_WIDTH . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</td>'; $xsell_box_contents .= '<td class="smallText"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_master']) . '">' . $xsell['products_name'] . '</a></td>'; if ($xsell_price = tep_get_products_special_price($xsell['products_id'])) { $products_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($xsell_price, tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])); } $xsell_box_contents .= '<td class="smallText" align="right">' . $products_price . ' </td>'; } //END OF IF ALREADY IN CART } // END OF IF ALREADY SUGGESTED } //END OF WHILE QUERY STILL HAS ROWS } //END OF FOREACH PRODUCT IN CART LOOP //Only draw the table if there are suggested products. if ($xsell_box_contents != '') { echo '<br><br><table class="productListing" width="90%" cellspacing="0" cellpadding="0" align="center"><tr><td colspan="4" class="productListing-heading" align="center">May we suggest:</td></tr><tr><td colspan="4" class="smallText" align="center">Enter Quantity desired, then click "Update"</td></tr>'; echo $xsell_box_contents . '</table>'; } ?> <!-- xsell_cart_eof //--> Thanks in advance. Quote Thank you in advance, AE
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.