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.
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.
Re: Better Together Contribution Support Thread
Quote:
Originally Posted by
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 Code:
zen_product_in_category(products_id, category_id)
This function works for linked products and top level categories.
Re: Better Together Contribution Support Thread
Try this for cat to cat discounts:
PHP Code:
function get_discount($discount_item, &$all_items) {
$discount = 0;
for ($dis=0, $n=count($this->discountlist); $dis<$n; $dis++) {
$found_match = false;
$li = $this->discountlist[$dis];
// Based on type, check ident1
if ( ($li->flavor == PROD_TO_PROD) ||
($li->flavor == PROD_TO_CAT) ) {
if ($li->ident1 == $discount_item['id']) {
continue;
} else {
$found_match = true;
}
} else { // CAT_TO_CAT, CAT_TO_PROD
// check to make sure a discount product has been added
if (zen_product_in_category((int)$discount_item['id'], $li->ident1)) { // modified to support linked products and top level categories
$found_match = true;
} else {
continue;
}
}
if ($found_match) {
for ($i=sizeof($all_items) - 1; $i>= 0; $i--) {
if ($all_items[$i]['quantity'] == 0)
continue;
$match = 0;
if ( ($li->flavor == PROD_TO_PROD) ||
($li->flavor == CAT_TO_PROD) ) {
if ($all_items[$i]['id'] == $li->ident2) {
$match = 1;
}
} else { // CAT_TO_CAT, PROD_TO_CAT
// check that a product in the other category exists
if (zen_product_in_category((int)$all_items[$i]['id'], $li->ident2)) { // modified to support linked products and top level categories
$match = 1;
}
}
if ($match == 1) {
$all_items[$i]['quantity'] -= 1;
if ($li->type == "$") {
$discount = $li->amt;
} else { // %
$discount = $all_items[$i]['final_price'] *
$li->amt / 100;
}
return $discount;
}
}
}
}
return 0;
}
You'll have to apply this to the other methods, but it's all I needed.
Re: Better Together Contribution Support Thread
I'm on Zen-Cart 1.3.9d with Better Together Marketing 2.3 and thought I should share a small HTML tag compliance issue I found today in the following files:
includes\templates\CUSTOM_TEMPLATE\templates\tpl_better_together_marketing.php
includes\templates\CUSTOM_TEMPLATE\templates\tpl_better_together_marketing_image s.php
Inside the for loop, the php echo that generates the span tag has a double quote ( " ) in the closing span tag. See below:
tpl_better_together_marketing.php:
PHP Code:
for ($i=0, $n=count($marketing_data); $i<$n; $i++) {
echo '<div class="discountText">';
echo $marketing_data[$i]['data'];
echo '<span class="bbn_button_noimg">' . $marketing_data[$i]['bbn_string'] . '</span">';
echo '</div>';
}
tpl_better_together_marketing_images.php:
PHP Code:
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>';
}
The double quote needs to be removed as it causes formatting issues in the final DOM display that permeates through the balance of the page. Basically, it prevents the echo of the two closing div tags. Found this using the developer tools in IE8, viewed the source for the Page DOM and spotted the missing closing div tags.
Search for: and replace it with: BTW: Thanks to Software Guy for this great add-on.
Re: Better Together Contribution Support Thread
Thank you very much for reporting this; I will fix it shortly.
That Software Guy
Re: Better Together Contribution Support Thread
I have a product which I need to offer free ONLY when any item from a certain Manufacturer is purchased.
Ideally, the free product should be visible in my store, but not purchasable. Customers should be advised that the only way to get it is to buy something from manufacturer X.
Could you tell me if this is possible to set up using Better Together?
Thanks!
Re: Better Together Contribution Support Thread
Better Together will not do this.
Re: Better Together Contribution Support Thread
Quote:
Originally Posted by
swguy
Better Together will not do this.
Oh, that's disappointing!
But thanks for you prompt reply :-)
Re: Better Together Contribution Support Thread
I've installed this but have a feeling it's not going to work for me but after hours of work I thought i'd ask.
Two things I'm trying to do.
First issue:
I want to offer a discount off category B (stitch markers) if any product in category A (hand dyed yarn) is purchased.
The problems: The products in category A are in 7 sub categories. So I have to do the 7 separate discounts - this is fine but when you use the marketing tool it list all 7 discounts which doesn't look very good.
Second issue the products in Category B (stitch markers) are populated from products put straight into this category and also linked from a hidden master category (that of a different manufacturer so that sales etc could be done just for that manufacturer) So therefore I have to do the discounts for both of these categories. Also not a problem but in the marketing it then shows up as Buy Item A Get 20% off Item B (with both of item B's titles showing up including the hidden category.
Really I'd just like to do a simple Buy from category A (and any of it's sub categories) get 20% off Category B (and any linked items in it) but I believe i can't do that (and it didn't work when I tried, lol).
I did do the changes in tpl_better_together_marketing.php from this page http://www.thatsoftwareguy.com/zenca...ry_issues.html (adding the bit of code and changing to $category) but this didn't make any differences.
So is there any way of doing this so the marketing doesn't show up all the different sub categories?
I'm thinking it would just be neater to offer a discount code on the home page.
Also second issue.
It appears that only one product is discounted??
If I put in one lot of category A (yarn) and 2 lots of category B (stitch markers) then only one of the category B products were discounted. Is this correct?
My URL is http://www.artezan.com.au though I have taken the Best together links off.
Thank you so much for any help.