Jump to content
Sign in to follow this  
mfreund

Using Xsell with STS 2.01 Help

Recommended Posts

I am trying to get xsell working with the simple template system 2.01......I have it working but now what I want to do is use the product_info.php.html page. When I try to do this the xsell stuff doesnt show up. When I go back to the default page it works fine. How do I get the xsell into the template....? Can anyone help me on this. I need to do it so I can customize image position etc...

 

 

 

Thanks

Share this post


Link to post
Share on other sites

you'll need to put the xsell stuff into a variable, capture it like other sts vars and then parse it through sts where you call it with the variable

Share this post


Link to post
Share on other sites
Bit of a bump here - can anyone advise on this? MFreund, did you get this working in the end?

 

I'm trying to pull throught the cross selling box into my sts modified production information page. I found this code at the bottom of the sts_product_info.php file and uncommented it so it was turned on, i also replaced the last bit of code to FILENAME_XSELL_PRODUCTS.

 

// See if any "Also Purchased" items
// I suspect that this won't work yet
  if ((USE_CACHE == 'true') && empty($SID)) {
    $template['alsopurchased'] = tep_cache_also_purchased(3600);
  } else {
    $template['alsopurchased'] = include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
  }

 

The problem is the recommendation comes through at the top of the page, and i havent event added the $alsopurchased to the template page. This took immediate effect upon uploading the sts_product_info.php script... Any ideas or help???!!!!!

 

screenshot.jpg

Share this post


Link to post
Share on other sites

Would it help anybody if I pasted the code of the following pages:

 

STS_PRODUCT_INFO.PHP

PRODUCT_INFO.PHP

PRODUCT_INFO.PHP.HTML

 

I really cant understand why this is appearing at the top of the screen. I dont think it has anything to do with the other pages.

Share this post


Link to post
Share on other sites

I now have the X-Sell Box appearing in my STS product info page. But, to my annoyance, the x-sell box is still appearing at the top of every single one of my product pages as well, which looks very stupid.

 

See for yourself at the following link: Wooch Catalog

 

The User Name is: admin and the password is: perfecteye

 

I have password protected the admin area with seperate log-in's for security. The bag of blue beads within the jewellery / bracelets section is an example of a product with a cross selling product associated to it.

 

This is what I did to get to this stage:

 

I installed the STS contribution, later I installed the X-Sell contribution.

 

I inserted the following code into sts_user_code.php:

 

$sts_block_name = 'xsell';
? require(STS_START_CAPTURE);
require(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
? require(STS_STOP_CAPTURE);
? $template['xsell'] = $sts_block['xsell'];

 

I have added the following code to the bottom of my sts_product_info.php:

 

// X-Sell Contribution
if ((USE_CACHE == 'true') && empty($SID)) {
? $template['xsell'] = tep_cache_also_purchased(3600);
? include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
} else {
? $template['xsell'] = include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
? include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}

 

As per the instructions of the x-sell contribution I have added this code to the standard product_info.php page:

 

<?php
//added for cross-sell
? ?if ((USE_CACHE == 'true') && empty($SID)) {
? ? ?echo tep_cache_also_purchased(3600);
include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
? ?} else {
include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
? ? ?include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
? ?}
?}
?>

 

I have put the $xsell variable into my product_info.php.html page.

 

Can anyone suggest how i stop the x-sell contribution from coming through at the top of every single one of my product pages? I'm starting to loose the faith on this... :'(

Edited by Perfect Eye

Share this post


Link to post
Share on other sites
I have added the following code to the bottom of my sts_product_info.php:

 

// X-Sell Contribution
if ((USE_CACHE == 'true') && empty($SID)) {
? $template['xsell'] = tep_cache_also_purchased(3600);
? include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
} else {
? $template['xsell'] = include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
? include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}

 

Wow, i'm solving my own issues - here's how to do it if you're following this thread. This bit quoted above isnt needed - i commented it out and now the xsell box doesnt appear at the top of the page, and also, I now have the x-sell coming through in the product info template, which is nice.

 

However, new issue, how do i remove the heading/box if there are no special items? It shows on every page - would rather its only visible if there is a special. Please see a product info page for what i mean. :D

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
Sign in to follow this  

×