Results 1 to 10 of 699

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Location
    Edinburgh, Scotland
    Posts
    243
    Plugin Contributions
    1

    Default 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.
    Last edited by fergusmacdonald; 3 Jun 2010 at 03:17 PM. Reason: Added example

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,531
    Plugin Contributions
    127

    Default 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.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,566
    Plugin Contributions
    74

    Default Re: Better Together Contribution Support Thread

    Quote Originally Posted by swguy View Post
    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_idcategory_id
    This function works for linked products and top level categories.

  4. #4
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,566
    Plugin Contributions
    74

    Default 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.

  5. #5
    Join Date
    Aug 2009
    Location
    Beaverton, OR
    Posts
    3
    Plugin Contributions
    0

    application error 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:
    PHP Code:
    '</span">'
    and replace it with:
    PHP Code:
    '</span>'
    BTW: Thanks to Software Guy for this great add-on.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,531
    Plugin Contributions
    127

    Default Re: Better Together Contribution Support Thread

    Thank you very much for reporting this; I will fix it shortly.

    That Software Guy
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Twitter Updates Sidebox Contribution Support Thread
    By delia in forum Addon Sideboxes
    Replies: 13
    Last Post: 29 Dec 2010, 12:44 AM
  2. Better Together Promotional Page Contribution
    By swguy in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 27 Feb 2010, 05:52 PM
  3. Windows Live Product Search Contribution Support Thread
    By numinix in forum All Other Contributions/Addons
    Replies: 209
    Last Post: 3 Jul 2009, 08:23 PM
  4. Better together mod
    By coolman in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 16 Aug 2008, 09:48 PM
  5. LinkConnector Affiliate Contribution Support Thread
    By hyperdogmedia in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Jun 2007, 06:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg