Better Together 2.3 has been released, with support for Cross Selling (undiscounted linkages). Cross sells are shown in a new centerbox on the product info page.
Printable View
Better Together 2.3 has been released, with support for Cross Selling (undiscounted linkages). Cross sells are shown in a new centerbox on the product info page.
Fantastic mod! :clap:
I was added a fieldset to the marketing text template (tpl_better_together_marketing_images.php) to put a label on it. However, the fieldset and label shows even when there are no "Better Together" discounts.
I tried inserting after the IF statement but doesn't seem to like that...:oops: where should it go so as not to show up when no products are linked?Code:<!-- bof Better Together Marketing -->
<fieldset><legend><i>Our "Better Together" Deals:</i></legend>
<?php
// Better Together Discount Marketing
$value = "ot_better_together.php";
include_once(zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] .
'/modules/order_total/', $value, 'false'));
include_once(DIR_WS_MODULES . "order_total/" . $value);
$discount = new ot_better_together();
if ($discount->check() > 0) {
$resp = $discount->get_discount_info($_GET['products_id'], $current_category_id, true);
$rresp = $discount->get_reverse_discount_info($_GET['products_id'], $current_category_id, true);
if ( (count($resp) > 0) || (count($rresp) > 0) ) {
$marketing_data = array_merge($resp, $rresp);
echo '<div class="content" id="betterTogetherDiscountPolicy">';
for ($i=0, $n=count($marketing_data); $i<$n; $i++) {
echo '<hr />';
echo '<div class="discountText">';
echo $marketing_data[$i]['data'];
echo '</div>';
echo '<div class="discountImages">';
echo
$marketing_data[$i]['first_href'] .
$marketing_data[$i]['first_image'] . '</a>' .
'<span class="product_plus">+</span>' .
$marketing_data[$i]['disc_href'] .
$marketing_data[$i]['second_image'] . '</a>';
if (isset($marketing_data[$i]['bbn_string'])) {
echo '<span class="bbn_button">' . $marketing_data[$i]['bbn_string'] . '</span">';
}
echo '</div>';
}
echo '</div>';
echo '<br class="clearBoth" />';
}
}
?>
</fieldset>
<!-- eof Better Together Marketing -->
Thanks!
You could move the fieldset stuff below
if ( (count($resp) > 0) || (count($rresp) > 0) ) {
Or you could just create some Better Together Discounts! :smile:
You have to move the closing fieldset above the clearBoth.
Thx for the help... I moved </fieldset> there and it didn't work. I tried each line just for giggles... no luck. Tried with and without the ; at the end of the line.
Code:if ( (count($resp) > 0) || (count($rresp) > 0) ) {
<fieldset><legend><i>Better Together</i></legend>;
$marketing_data = array_merge($resp, $rresp);
echo '<div class="content" id="betterTogetherDiscountPolicy">';
for ($i=0, $n=count($marketing_data); $i<$n; $i++) {
echo '<hr />';
echo '<div class="discountText">';
echo $marketing_data[$i]['data'];
echo '</div>';
echo '<div class="discountImages">';
echo
$marketing_data[$i]['first_href'] .
$marketing_data[$i]['first_image'] . '</a>' .
'<span class="product_plus">+</span>' .
$marketing_data[$i]['disc_href'] .
$marketing_data[$i]['second_image'] . '</a>';
if (isset($marketing_data[$i]['bbn_string'])) {
echo '<span class="bbn_button">' . $marketing_data[$i]['bbn_string'] . '</span">';
}
echo '</div>';
}
echo '</div>';
</fieldset>;
echo '<br class="clearBoth" />';
:blush:
I really should learn how to code... of course my "try everything and see if it works" method isn't so bad... just real slow. :flex:Code:
?>
<fieldset><legend><i>Save with Our "Better Together" Deals</i></legend>
<?php
Thanks for the help. Now I'm off to your site to purchase the "Buy Both Now" button
I was looking through this add on, and quite honestly, it looks pretty darn solid and flexible. I do have a question though.
I'm looking to start out by using it specifically as a cross-sell tool, but eventually expanding on the other features.
Here's the question..... If I...
$this->add_cat_to_cat(a, b, "X", 0);
as a cross sell between catagories a and b, just how many items will display in the 'you may also like' centerbox? Is it limited to displaying a certain number of random items or will the entire catagory display?
I'm curious as to how I need to handle this:smile:
Thanks in advance!
In the formulation you used, only the category image for category B would be used. If you want to display specific products, you would need to use add_cat_to_prod() and use specific product ids.
Thanks for the quick response, good information to know. Does it limit the number of items in the centerbox for cross sell items or does it list everything you put in for paramaters?
Being selectful isn't a problem, I just dont want to overload a box with things! :)