This when combined with enabling: TPP - Global Cross Sell Tab in Admin > Configure > Tabbed Products Pro seemed to do everything required
EXCEPT the javascript bit to hide the original block and display the new tabbed version.
So on checking /includes/templates/classic/jscript/jscript_tpp.js I noted that it was looking for id "crossSell" to disable and then enabling crossSell_tab instead.
Ultimate Cross Sell uses a number after it's ID's, the box that I was using was the Upsell which I found was called crossSell2 when I checked the HTML code for a page on the live site:
HTML Code:
<!-- bof: tpl_modules_ultimate_cross_sell_products -->
<div class="centerBoxWrapper" id="crossSell2">
So my first attempt was obviously to edit jscript_tpp.js at lines 95:
Code:
hackArr[6] = document.getElementById('crossSell');
and 110:
Code:
NewArr[6] = document.getElementById('crossSell_tab');
to "crossSell2"
To my frustration this didn't work, I think it's to do with the fact that tpl_modules_ultimate_cross_sell_products.php appends the number at run time to the title.
So for me, where I only use one cross sell centreBox (I won't work properly if you have two, for example a cross sell and upsell) I did the quick and dirty fix of renaming the title on the cross sell template as follows:
Edit /includes/templates/classic/templates/tpl_modules_ultimate_cross_sell_products.php and change:
PHP Code:
<!-- bof: tpl_modules_ultimate_cross_sell_products -->
<div class="centerBoxWrapper" id="crossSell<?php echo $cross_sell ?>">
to:
PHP Code:
<!-- bof: tpl_modules_ultimate_cross_sell_products -->
<div class="centerBoxWrapper" id="crossSell">
Now it works perfectly for me. As I say the caveat is that if you use the ultimate cross sell mod to show multiple centre boxes that would normally have ID's crossSell1 crossSell2 etc this hack will call them all just crossSell and I don't know how the tab system will then show them, if at all, but it will work if you only use a single crossSell centre box (you can still show mutliple cross sell/upsell side boxes, this only affects the centre boxes.)
Hope this is of help.
Andrew
Bookmarks