Re: Better Together Contribution Support Thread
Great mod Scott.
However I couldn't get better promo to work correctly no matter what have I tried. Please look at the following link, it seems it stops half way.
http://www.boldersounds.net/index.ph...together_promo
Perhaps it didn't create for downloadable music product?
Thanks in advance.
Chih How
Re: Better Together Contribution Support Thread
By the way, I also discovered that the xxx link of "Buy this item, get a xxx at 50% off" points to "product_info" instead "product_music_info", how can I correct it?
Chih How
Re: Better Together Contribution Support Thread
This is set up for regular products, not music products. You're going to have to make a bunch of changes to make it work for music.
Re: Better Together Contribution Support Thread
So what are the changes need to be made?
I just want to know how complicated they are in order to decide if I should give up.
Thanks.
Chih How
Re: Better Together Contribution Support Thread
I am trying to work out if I have got this mod set up right as I believe the tax calculation to be a bit odd.
I can get the set up so that the VAT shows correctly but the discount shows up wrong or I can get the discount to show correctly but the tax then for the order is wrong.
I have been testing this again and again and seem to have a discrepancy with the way tax is calculated. Have I got something wrong.
To simplify this I have got 2 products the same price and set better together to discount the second by 5% UK Vat is 17.5% so:
Sale Price £29.99
Discount @ 5% : £1.50
Sale Price therefore: £28.49
VAT payable is £4.47 on the £29.99 item And VAT on second item is £4.24 i.e on £28.49
Total VAT is £8.71
However I get £8.67 showing in Zencart.
The set up for this is INclude tax true tax calculation - Standard
If I change this to include tax false then the discount is £1.28 but the tax calculates correctly to £8.71.
How is the tax being calculated when the better together module is in place as I cannot get to that figure?
Re: Better Together Contribution Support Thread
If this is UK site? As I see zen on my test site when adding gear to the checkout it calculates vat as a total ie:
1- £28.49 = vat £4.99
2- £29.99 = vat £5.24
Total inc vat = £68.72
Vat payable = £10.23
so i would suspect you zone rates are wrong in admin. check your zone rates are active, and are at 17.5 not 7% florida default rate.
Re: Where does the code go?
Hi Scott,
I have a quick question...
On the Better Together Admin Panel, you furnish this code:
if (!IS_ADMIN_FLAG) {
require(DIR_WS_MODULES . 'better_together_admin.php');
}
to add to:
includes/modules/order_total/ot_better_together.php
This is all fine and good, especially since I have a "virgin" copy of the ot_better_together.php file. I have found it, located the "set up" code at the bottom, found that most of the lines have been commented out and all of that, BUT.... I don't know php, so where does it go? Do I paste it in between the {} brackets, after them, before them? I am lost! I am so sorry! You've led me to the water but I need help scooping it now. :blush:
This is the set up code at the bottom of the ot_better_together.php file:
function setup() {
// Add all linkages here
// Some examples are provided:
/*
// Buy product 83, get product 53 at 50% off
$this->add_prod_to_prod(83, 53, "%", 50);
// Buy product 83, get one free
$this->add_prod_to_prod(83, 83, "%", 100);
// Buy product 83, get an item from category 14 free
$this->add_prod_to_cat(83, 14, "%", 100);
// Buy an item from category 21, get an item from category 14 free
$this->add_cat_to_cat(21, 14, "%", 100);
// Buy item 12, get a second one free.
$this->add_twoforone_prod(12);
// Buy any item from category 10, get a second identical one free
$this->add_twoforone_cat(10);
// $this->add_twoforone_prod(17);
$this->add_prod_to_prod(26, 27, "%", 100);
$this->add_prod_to_prod(83, 15, "%", 50);
$this->add_prod_to_prod(83, 20, "%", 25);
$this->add_cat_to_cat(14, 14, "%", 100);
$this->add_prod_to_prod(3, 25, "%", 50);
*/
}
}
Re: Better Together Contribution Support Thread
Scrapbook supplies, I think the comments in my code make it clear where your mods go:
Code:
function setup() {
// Add all linkages here
// LifeRing linkages - Brochure Sampler free with any book order
// To make this work we had to add a separate link for every item in the Books category
$this->add_prod_to_prod(2,16,"%",100);
$this->add_prod_to_prod(3,16,"%",100);
$this->add_prod_to_prod(4,16,"%",100);
$this->add_prod_to_prod(5,16,"%",100);
$this->add_prod_to_prod(6,16,"%",100);
// Some examples are provided:
/*
// Buy product 83, get product 53 at 50% off
$this->add_prod_to_prod(83, 53, "%", 50);
// Buy product 83, get one free
$this->add_prod_to_prod(83, 83, "%", 100);
It isn't necessarily clear that all the stuff after //Some examples are provided is commented out... I had to ask about it myself.
And, of course, it all has to go inside the closing bracket } for function setup().
Hope this helps.
Re: Better Together Contribution Support Thread
I have updated the help on my home page to answer this question more clearly.
Thanks,
Scott
Re: Better Together Contribution Support Thread
I "get" that the sample text is commented out. What I didn't and am still not sure about but will just try to figure it out is where it gets pasted; even without the sample text, as there is still a set of parenthesis and then the { } brackets, plus some lines at the bottom starting with $ that are not commented out, unless a $ also comments lines out and I do not know that.
I am not a php guru, I am relatively new to Zen Cart, and have only worked with php for about 1-1/2years, but during this time I have learned that one little symbol in the wrong place has the potential to render the site useless - so I tread carefully.