YePix Posted April 13, 2018 Share Posted April 13, 2018 I have a question about the X-Sell module. What needs to be set where, so I'm not redirected to another page when clicking on buy? In the admin the forwarding is set to false and all pages remain the same, but with X-Sell I am led after the purchase to index.php. Can someone help here? Thank you Link to comment Share on other sites More sharing options...
burt Posted April 16, 2018 Share Posted April 16, 2018 What X-Sell module ? What version osCommerce? Please Read: Link to comment Share on other sites More sharing options...
YePix Posted April 18, 2018 Author Share Posted April 18, 2018 Hi Burt, thanks and sorry. Yes i have responsive 2.3.4.1BS Edge X_Sell_For_2.3.4_V3.2 Link to comment Share on other sites More sharing options...
Dan Cole Posted April 19, 2018 Share Posted April 19, 2018 A link to the actual add-on, or the support forum if there is one, might help....I tried Googling for it but got nothing. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 19, 2018 Share Posted April 19, 2018 @Dan Cole He means this one here. https://apps.oscommerce.com/Odv37 Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 19, 2018 Share Posted April 19, 2018 Just had a quick look at the files and install manual. Not sure if the following is the reason for the wrong redirect since I didn't test it but there is a small typo in Step 14 (application_top.php) This $parameters = array('action', 'pid', 'products_to_but_id'); should be $parameters = array('action', 'pid', 'products_to_buy_id'); The add-on also needs some overhaul to be Edge compatible. All FILENAME_ and DIR_WS_ definitions need to be replaced. Link to comment Share on other sites More sharing options...
YePix Posted April 19, 2018 Author Share Posted April 19, 2018 Thanks Tsimi, I have changed the bug but it still does not work. Again and again directed to the index.php ********************************************** functions/cache.php // Cache the also Xell module function tep_cache_xsell_products($auto_expire = false, $refresh = false) { global $_GET, $language, $languages_id; $cache_output = ''; if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) { if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id'], $auto_expire)) { ob_start(); include('includes/modules/xsell_products.php'); $cache_output = ob_get_contents(); ob_end_clean(); write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id']); } } return $cache_output; } includes/application_top.php if (DISPLAY_CART == 'true') { $goto = 'shopping_cart.php'; $parameters = array('action', 'cPath', 'products_id', 'pid'); } else { $goto = basename($PHP_SELF); if ($_GET['action'] == 'buy_now') { // BOE: XSell if (isset($_GET['product_to_buy_id'])) { $parameters = array('action', 'pid', 'products_to_buy_id'); } else { $parameters = array('action', 'pid', 'products_id'); } // EOE: XSell } else { $parameters = array('action', 'pid'); } } includes/modules/xsell_products.php if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true')) { $qty = (isset($xsell['products_quantity']) ? $xsell['products_quantity'] : 'x'); if (($xsell['products_bundle'] == 'yes') || ($qty == 'x')) $qty = tep_get_products_stock($xsell['products_id']); } if ((STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') && ($qty < 1)) { } else { if (SHOW_BUTTON_BUY_NOW == 'true') { $lc_text = '<br><div class="col-xs-12 text-right">' . tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-eye', tep_href_link('product_info.php', 'products_id=' . $xsell['products_id']), 'btn-success btn-sm') .' '. tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $xsell['products_id']), NULL, NULL, 'btn btn-success') . '</div>'; }else{ $lc_text = '<br><div class="col-xs-12 text-center">' . tep_draw_button(SMALL_IMAGE_BUTTON_VIEW, 'fa fa-eye', tep_href_link('product_info.php', 'products_id=' . $xsell['products_id']), 'btn-success btn-sm') . '</div>'; }} $products_xsell_content .= $lc_text; } Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 20, 2018 Share Posted April 20, 2018 @Yepi I could recreate the redirect problem. I could not find any solution but looking at another module like "also_purchased" it does not contain any "buy now" or "add to cart" button. In fact I don't recall any module or add-on that adds something to the product_info.php page with a buy button except for the Master Products add-on which is way more complex then this. I suggest you either remove the buy now button and only keep a view button so that you get redirected to that product page or what I was able to do is a redirect to the product page of the product you just added to the cart. Check here and add this new action into the application_top.php file (catalog side) Check here Link to comment Share on other sites More sharing options...
YePix Posted April 21, 2018 Author Share Posted April 21, 2018 Thank you very much. That helps me a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.