Zen Cart Logo
Forums / Addon Order Total Modules / Better Together Contribution Support Thread

Better Together Contribution Support Thread

Views: 203,784

Results 341 to 360 of 696
26 Mar 2010, 19:35
#341
psp_queen avatar

psp_queen

New Zenner

Join Date:
Jul 2009
Posts:
4
Plugin Contributions:
0

Better Together Contribution Support Thread

Well, thanks for your reply, but please do not assume I have not 'carefully followed' your examples. I have; in fact I have copied and pasted the exact code for what I want from your information pages, just like you have shown me above. When that didn't work I tried copying and pasting the handy examples in the actual php file. I tried all combinations to see if I could find one that worked and then see where I was going wrong. All I changed were the numbers for the categories, so mine read:

function setup() {
$this->add_twoforone_cat(23);
}

That's it. No matter how many times I look at it I can't see where I've got any code wrong. Just to make sure, I've tried it again, copying your code above and just changing the numbers. Again I get the blank page.

Is there any other reason this would not be working?

26 Mar 2010, 19:39
#342
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

If you're getting a blank page, you'll need to follow these directions to debug it:

http://www.zen-cart.com/forum/showthread.php?t=84613

26 Mar 2010, 19:47
#343
psp_queen avatar

psp_queen

New Zenner

Join Date:
Jul 2009
Posts:
4
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

*Slightly later:
*
After trying again with your code above, I have finally got it to work - by leaving off the trailing bracket. Whether it's supposed to be there or not I'm not sure but my installation seems to work without it, which is all that matters.

26 Mar 2010, 19:59
#344
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

Hmmm.... you might be getting in trouble with having blank lines after the

?>

Be sure when you transfer files to your server that the very last line is that closing tag.

26 Mar 2010, 20:11
#345
psp_queen avatar

psp_queen

New Zenner

Join Date:
Jul 2009
Posts:
4
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

It is, there are no blank lines after ?> The bracket I removed was at the end of your code above.

03 Apr 2010, 13:04
#346
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

Better Together 2.2 is now available. This version features another tax setting (Re-Calculate Tax = VAT) for tax included shops. If you do not run with Display Prices with Tax = true, you may skip this upgrade.

An additional change was made for currency-based discounting for tax included shops. Now all discounts - not just percent off discounts - are grossed up for taxes if you use include_tax = yes. In some earlier versions, I tried not grossing up dollar based discounts. However, I believe uniform treatment is a more consistent and logical approach.

13 Apr 2010, 00:37
#347
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

Better Together will work fine for non-VAT liable, non-tax-included shops in 1.3.9. I will release another version after 1.3.9 is finalized which is compliant with the new style of tax handling for tax-included shops in 1.3.9.

02 May 2010, 16:04
#348
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

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.

23 May 2010, 23:00
#349
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

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.

<!-- 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 -->

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?

Thanks!

23 May 2010, 23:21
#350
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

You could move the fieldset stuff below

if ( (count($resp) > 0) || (count($rresp) > 0) ) {

Or you could just create some Better Together Discounts! :smile:

24 May 2010, 00:31
#351
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

Thanks for such a quick reply...

swguy:

You could move the fieldset stuff below
if ( (count($resp) > 0) || (count($rresp) > 0) ) {

When I do that the "Better Together" and the "May We Also Recommend" box doesn't show at all. :dontgetit

Or you could just create some Better Together Discounts! :smile:

might just have to do that! :yes:

24 May 2010, 00:32
#352
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

You have to move the closing fieldset above the clearBoth.

24 May 2010, 00:48
#353
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

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.

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" />'; 
24 May 2010, 01:05
#354
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

:blush:

?>
<fieldset><legend><i>Save with Our "Better Together" Deals</i></legend>
<?php

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:

Thanks for the help. Now I'm off to your site to purchase the "Buy Both Now" button

03 Jun 2010, 00:06
#355
nehoward64 avatar

nehoward64

Zen Follower

Join Date:
Mar 2010
Location:
Battle Creek, MI
Posts:
124
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

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!

03 Jun 2010, 00:24
#356
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

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.

03 Jun 2010, 00:36
#357
nehoward64 avatar

nehoward64

Zen Follower

Join Date:
Mar 2010
Location:
Battle Creek, MI
Posts:
124
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

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! :)

03 Jun 2010, 14:14
#358
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

Re: Better Together Contribution Support Thread

I've had a look through the support thread and can't find anything relating to this, but apologies if it's already been answered somewhere else.

Is it possible to modify this module to be able to create linkages between linked products in a category rather than using their master category id. I understand that the lack of this functionality is covered in the documentation and am wondering if it is actually possible or if there is something which hinders its integration.

For example a product 'Cotton T-Shirt' has a master category of 'Shirts' and is linked to a hidden category 'cotton shirts'. I would like to add a linkage to all products in the hidden category 'cotton shirts' to a particular product, but not all the products in 'Shirts'.

Thanks.

03 Jun 2010, 15:00
#359
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Better Together Contribution Support Thread

It is certainly possible, but a complete implementation would require a lot of changes (and a boatload of even more confusing documentation), so I didn't go this route, although I seriously considered it at one point.

13 Jul 2010, 01:22
#360
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,566
Plugin Contributions:
58

Re: Better Together Contribution Support Thread

swguy:

It is certainly possible, but a complete implementation would require a lot of changes (and a boatload of even more confusing documentation), so I didn't go this route, although I seriously considered it at one point.
I have to agree, this module needs to support linked products. For example, then it would be so easy to throw a bunch of products into a sale category for a BOGO sale.

Otherwise, changing the master category id could be detrimental to SEO. Please consider using the function ```php
zen_product_in_category(products_id, category_id)

This function works for linked products and top level categories.