Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Chenge the "sold out" button position

    Hi,

    I'd like to make a minor change on my template.
    Actually the "sold out" button for a product is showed below the description, below the price.

    You can see the button here (first product, the button "ESAURITO"):
    http://tinyurl.com/5rtzhg2

    I'd like to move the sold out button immediately below the product title, before the description. I attach a picture of how I'd like it to appear.

    Which files should I modify and how?

    Thank you for your support.
    Ste

  2. #2
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Looks like your theme has customised the layout for your products listing, so you'll have to look in your theme files and make the changes within the code. The buttons aren't within css tags to allow you to move them around.

    Possibly you need to look in one or both of these files...

    /includes/templates/theme210/common/tpl_tabular_display.php
    /includes/modules/theme210/product_listing.php

  3. #3
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Quote Originally Posted by Celtic View Post
    Looks like your theme has customised the layout for your products listing, so you'll have to look in your theme files and make the changes within the code. The buttons aren't within css tags to allow you to move them around.

    Possibly you need to look in one or both of these files...

    /includes/templates/theme210/common/tpl_tabular_display.php
    /includes/modules/theme210/product_listing.php
    thanks for your reply. unfortunately I found only the first file you specified but could you tell me which tag should I look for?

    If you'd like to help me I have zipped the folder of the theme at this address: http://dl.dropbox.com/u/267552/theme210.zip

    Thank you very much for your help

  4. #4
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Looking around I see you probably have the 'Column Layout / Grid Layout for Products Listing (Add On Module for Zen Cart v1.3.8)' installed.

    If that is the case, then it's likely to be the second line I mention above that needs editing. If you look somewhere around line 189, you may find a line like...


    PHP Code:
            $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']); 
    You need to move that line up to somewhere around line 143, where you may see something like...

    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 

    The line you're moving needs to be put between the } and the break; line.

  5. #5
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Quote Originally Posted by Celtic View Post
    Looking around I see you probably have the 'Column Layout / Grid Layout for Products Listing (Add On Module for Zen Cart v1.3.8)' installed.

    If that is the case, then it's likely to be the second line I mention above that needs editing. If you look somewhere around line 189, you may find a line like...


    PHP Code:
            $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']); 
    You need to move that line up to somewhere around line 143, where you may see something like...

    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 
    The line you're moving needs to be put between the } and the break; line.
    Tried it doesn't change at all...

  6. #6
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    What was the path of the file that you edited? Can you send me a copy of the edited file and I'll take a look at it tomorrow.

  7. #7
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Quote Originally Posted by Celtic View Post
    What was the path of the file that you edited? Can you send me a copy of the edited file and I'll take a look at it tomorrow.
    Thanks the path is includes/modules/theme210/product_listing.php

    You can download the edited file at this address: http://dl.dropbox.com/u/267552/product_listing.php

    Thank you for your great support

  8. #8
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Quote Originally Posted by Celtic View Post
    What was the path of the file that you edited? Can you send me a copy of the edited file and I'll take a look at it tomorrow.
    Hi do you have any news/idea to fix it?
    Thank you

  9. #9
    Join Date
    Feb 2010
    Posts
    154
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    I hadn't looked too closely at the previous $lc_text code, so hadn't noticed that the title and the description were combined in one line. The following should fix it...

    Replace all of this bit...


    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            break; 


    ... with this bit ...


    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>';
                    
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            
    $lc_text .= '<div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            break; 

    You can see that the line you moved after my previous post is now sitting in between the title and the description, which should give you what you want (assuming this is the correct file to be editing).

  10. #10
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Chenge the "sold out" button position

    Quote Originally Posted by Celtic View Post
    I hadn't looked too closely at the previous $lc_text code, so hadn't noticed that the title and the description were combined in one line. The following should fix it...

    Replace all of this bit...


    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            if (isset(
    $_GET['manufacturers_id'])) {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            } else {
              
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            break; 
    ... with this bit ...


    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_align '';
            
    $lc_text '<h3 class="itemTitle"><a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3>';
                    
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            
    $lc_text .= '<div class="listingDescription">' zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
            break; 
    You can see that the line you moved after my previous post is now sitting in between the title and the description, which should give you what you want (assuming this is the correct file to be editing).
    GREAT! Now it works perfectly, thank you very much for your kind help!
    Thanks

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Removing the "More Info" from Sold Out Button
    By retched in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 5 Jun 2014, 07:04 AM
  2. v150 "Sold Out" -- how to add text below button?
    By WebKat in forum General Questions
    Replies: 2
    Last Post: 31 Jul 2012, 02:35 AM
  3. Sold Out Button says "Sold Out SM".... Sophy Blue
    By huntleybill in forum Addon Templates
    Replies: 3
    Last Post: 28 Nov 2011, 05:32 AM
  4. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM
  5. Show both "Add to Card" and "Sold Out" button
    By lgarner in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Feb 2010, 04:16 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR