Jump to content

Recommended Posts

I see what you are saying, but I want it more so they see a product they weren't necessarily looking for, I sell adult toys and its a good way to promote other products

Share this post


Link to post
Share on other sites

The idea of the cross sell addon is to link to other items that are relevant to the one being looked at. It may take time to set up, but if done properly will result is additional sales. If you did it randomly it will not be as effective, Spend a bit of time, do it right and get the benefits.

 

You an also use the also purchased addon that may do something like you require.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Thanks to @@Snoopy10 for creating and @@Mort_lemur for carrying on with this add-on.

 

I've got two issues which may be minor.

 

a) images within the admin module are broken. Image URL is pointing to admin/images where my images are in /images. I've done the changes that @@Mort_lemur referenced to in her post with regards to changing 

DIR_WS_IMAGES_THUMBS to read DIR_WS_IMAGES

I've also removed all instances of p.image_display and p.image_folder.

 

b) I need to be able to place the x-sell prompts/offers between checkout_shipping.php and checkout_confirmation.php - how can I do this?

Share this post


Link to post
Share on other sites

Hello,

 

I would like to change the appearance of the add to cart button....actually there is none: http://www.handy-freunde.de/apple-iphone-6-16gb-space-gray-p-339.html

 

Normally it is a button tag, but not in the xsell_products.php - there is an a tag. Thats why it doenst look like the other button. How can I change that or where do I find the a tag to change it to a button tag?

 

Thanks a lot!

Lars

Share this post


Link to post
Share on other sites

I'm in the process of porting this addon to a content module for 2.3.4BS - to save any duplication of effort, if you need to work on it before I've finished, githubbers can access the work in progress at https://github.com/BrockleyJohn/Responsive-osCommerce/tree/cross_sell_addon

 

Current status: first cut working admin & catalog, content module stuff is new, admin xsell page largely unchanged, caching not yet done


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn How are you getting on with this. Had a look at the github link you posted, but it went well over my head, sorry. I would like this addon so if you need any basic help with testing I am available.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@@BrockleyJohn How are you getting on with this. Had a look at the github link you posted, but it went well over my head, sorry. I would like this addon so if you need any basic help with testing I am available.

 

@@14steve14 I have a working version that I haven't bundled yet. It does proper caching for the product listing page so involves updates to several core files in admin... but that's probably overkill for most stores so I was thinking of making a stripped-down version without caching and a much easier install.

 

Plus, with the other addons I ported since, my validation design has developed a bit and I was going to revisit and stick the latest into xsell.

 

How urgently do you need it and would you prefer to wait a couple more days for a much easier job?


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn Thanks for the reply. As to time scale I am not really bothered, as I ws not meaning to put pressure on you to complete. Currently I am not bothered about altering core files as there are many addons that will need converting that I have already used.

 

I was gong to start playing with the addon code and try to convert it to be used with BS Gold version, when I found your post and thought it may be worth contacting you to save me a bit of time as I am no coder. I use the addon in my old store and using the same one in the latest version may save time when transferring the database across.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

@@14steve14, I have bundled this up but don't have a suitable database ready to test it on, so it's going to be several more days till it's properly ready: I've reapplied the changes to the BS Gold release files so these really need testing from the ground up before public release. However, if you're keen for a play in the meantime let me know and I'll zip it up and stick it somewhere so you can download it... and tell me what you think of the install instructions!


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

I will be more than happy to help you test and develop this addon. Its needed.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

I have completed preliminary testing on a version of the addon for 2.3.4 Bootstrap Gold. I am not going to upload it to the addons section until it's thoroughly tested and fit for use on a live install.

 

If anyone would like to try it out on a test or development store, pm me for a download link.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

I have completed preliminary testing on a version of the addon for 2.3.4 Bootstrap Gold. I am not going to upload it to the addons section until it's thoroughly tested and fit for use on a live install.

 

If anyone would like to try it out on a test or development store, pm me for a download link.

 

I was just about to ask if anyone knew if there was a Bootstrap version available.

 

Yes please!

Share this post


Link to post
Share on other sites

I was just about to ask if anyone knew if there was a Bootstrap version available.

 

Yes please!

 

@@GlenPig Please let me know how you get on - the code's been live for a while now without showing any major problems but the installation's only been tested by Steve.

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

I have just added it again to a new test site and it all went smoothly.  No errors apart from the one I messed up on.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Anyone managed to update xsell to include SPPC?


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

forgot to add code

<?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
*/
//fixed bug
//require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_XSELL_PRODUCTS);
if ((USE_CACHE == 'true') && empty($SID)) {
	// include currencies class and create an instance
	require_once(DIR_WS_CLASSES . 'currencies.php');
	$currencies = new currencies();
}

if ($_GET['products_id']) {

	//$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, p.image_folder, p.image_display, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, specials_new_products_price
	//fixed bug
//	$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, p.image_folder, p.image_display, pd.products_name, p.products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price
	$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 = '" . $_GET['products_id'] . "'
	and p.products_status = '1'
	order by sort_order asc limit " . MAX_DISPLAY_XSELL);

// global variable (session) $sppc_customer_group_id -> local variable customer_group_id

  if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
    $customer_group_id = $_SESSION['sppc_customer_group_id'];
  } else {
    $customer_group_id = '0';
  }
  if (($no_of_new_products = tep_db_num_rows($xsell_query)) > 0) {
	  while ($_new_products = tep_db_fetch_array($xsell_query)) {
	$xsell[] = $_new_products;
	$list_of_prdct_ids[] = $_new_products['products_id'];
	}

$select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' ";
  if ($no_of_new_products > 1) {
   for ($n = 1 ; $n < count($list_of_prdct_ids) ; $n++) {
   $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' ";
   }
}
// get all customers_group_prices for products with the particular customer_group_id
// however not necessary for customer_group_id = 0
if ($customer_group_id != '0') {
  $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from products_groups pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."'");
	while ($pg_array = tep_db_fetch_array($pg_query)) {
	$new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => '');
	}

   for ($x = 0; $x < $no_of_new_products; $x++) {
// replace products prices with those from customers_group table
     if(!empty($new_prices)) {
	     for ($i = 0; $i < count($new_prices); $i++) {
		     if( $xsell[$x]['products_id'] == $new_prices[$i]['products_id'] ) {
			     $xsell[$x]['products_price'] = $new_prices[$i]['products_price'];
		     }
	     }
	   } // end if(!empty($new_prices)
   } // end for ($x = 0; $x < $no_of_products_new; $x++)
} // end if ($customer_group_id != '0')

// an extra query is needed for all the specials
	$specials_query = tep_db_query("select products_id, specials_new_products_price from " . TABLE_SPECIALS . " where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "' ");
	while ($specials_array = tep_db_fetch_array($specials_query)) {
	$xsell_s_prices[] = array ('products_id' => $specials_array['products_id'], 'specials_new_products_price' => $specials_array['specials_new_products_price']);
	}

// replace products_price with the correct specials_new_products_price
if(!empty($xsell_s_prices)) {
	for ($x = 0; $x < $no_xsell; $x++) {
    for ($i = 0; $i < count($xsell_s_prices); $i++) {
      if( $xsell[$x]['products_id'] == $xsell_s_prices[$i]['products_id'] ) {
        $xsell[$x]['products_price'] = $xsell_s_prices[$i]['specials_new_products_price'];
      }
    }
  }
} // // end if(!empty($xsell_s_prices)

	for ($x = 0; $x < $no_of_new_products; $x++) {
?>
<!-- xsell_products //-->
<?php
     $info_box_contents = array();
     $info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_PRODUCTS);
     //new contentBoxHeading($info_box_contents);

     $row = 0;
     $col = 0;
     $info_box_contents = array();
     while ($xsell = tep_db_fetch_array($xsell_query)) {
			if (tep_not_null($xsell[x]['specials_new_products_price'])) {
				$xsell_price =  '<s>' . $currencies->display_price($xsell[x]['products_price'], tep_get_tax_rate($xsell[x]['products_tax_class_id'])) . '</s><br>';
       	$xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell[x]['specials_new_products_price'], tep_get_tax_rate($xsell[x]['products_tax_class_id'])) . '</span>';
			} else {
				$xsell_price =  $currencies->display_price($xsell[x]['products_price'], tep_get_tax_rate($xsell[x]['products_tax_class_id']));
			}
			if ($xsell[x]['image_display'] == 1) {
				$text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell[x]['products_id']) . '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/' . 'no_picture.gif', TEXT_NO_PICTURE, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell[x]['products_id']) . '">' . $xsell[x]['products_name'] .'</a><br>' . $xsell_price. '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&product_to_buy_id=' . $xsell[x]['products_id'], 'NONSSL') . '">' . tep_draw_button( IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link( FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $xsell[x]['products_id']));
			} elseif (($xsell[x]['image_display'] != 2) && tep_not_null($xsell[x]['products_image'])) {
				$text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell[x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES  . $xsell[x]['products_image'], $xsell[x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell[x]['products_id']) . '">' . $xsell[x]['products_name'] .'</a><br>' . $xsell_price. '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&product_to_buy_id=' . $xsell[x]['products_id'], 'NONSSL') . '">' . tep_draw_button( IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link( FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $xsell[x]['products_id']));
			}
	   $info_box_contents[$row][$col] = array('align' => 'center',
                                              'params' => 'class="smallText" width="33%" valign="top"',
                                              'text' => $text) ; 
	   $col ++;
       if ($col > 2) {
         $col = 0;
         $row ++;
       }
     }   
   }
 }
//new contentBox($info_box_contents);
//new contentBoxStart($info_box_contents);
?>
<div class="ui-widget infoBoxContainer">
    <div class="ui-widget-header ui-corner-top infoBoxHeading">
      <span><?php echo TEXT_XSELL_PRODUCTS; ?></span>
    </div>

    <?php new contentBoxStart($info_box_contents); ?>
  </div>

<!-- xsell_products_eof //-->
<?php


}
?>

Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×