Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Posts
    11
    Plugin Contributions
    0

    help question more info link that shows up when item is sold out

    I have wracked my brain on this one and have finally decided to beg for help.

    This is my first try at installing and customizing a zencart so please forgive me if I sound stupid.

    I know (from searching this forum and reading every post I could find with this topic) that I can remove the ...more info text from the english.php file which will make the text go away.

    You can see what I mean here:

    http://finehandwear.com/store/index....=index&cPath=6

    Problem is that there is still a space left behind where the text was supposed to be.

    I also found the area in the product_listing.php file located in modules that controls this function but I can't for the life of me figure out what to remove and what to keep. I tried to remove the bolded text and it didn't do anything.

    Code:
           // more info in place of buy now
            $lc_button = '';
            if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
            } else {
              if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
                if (
                    // not a hide qty box product
                    $listing->fields['products_qty_box_status'] != 0 &&
                    // product type can be added to cart
                    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                    &&
                    // product is not call for price
                    $listing->fields['product_is_call'] == 0
                    &&
                    // product is in stock or customers may add it to cart anyway
                    ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
                  $how_many++;
                }
                // hide quantity box
                if ($listing->fields['products_qty_box_status'] == 0) {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
                } else {
                  $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
                }
              } else {
    // qty box with add to cart button
                if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  $lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
                } else {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
                }
              }
            }
            $the_button = $lc_button;
            $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? 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']) . '">' . MORE_INFO_TEXT . '</a>';
            $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 .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
    I just want to have the SOLD OUT image in line with the BUY NOW buttons and to lose the ...more info in the process.

    Any help would be greatly appreciated.

    Sincerely, Tanya

  2. #2
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    Try changing the following:

    Instead of removing the bolded line completely, try changing it to

    Code:
    $lc_button = '';
    Then try changing line 240 from:
    Code:
    $lc_text = implode('<br />', $product_contents);
    To:
    Code:
    $lc_text = implode('', $product_contents);
    You may need to manually add back some <br /> tags if you want more spacing after editing the implode line.

  3. #3
    Join Date
    Aug 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    Great minds think alike! lol

    I actually tried both of those options last night after reading the different posts on this board. Unfortunately neither of them do the job.

    I might be misunderstanding you though so I wanted to clarify something.

    When I remove the bold anchor tag it actually creates the $lc_button = ''; since that tag was inside the apostrophe's of that code.

    Should I be adding another instance of $lc_button=''; inside that code?

    Ohhh and removing the line break on line 204 just removes the space that is between the bottom of the image and the title.

    I am willing to try anything and everything if you have any more thoughts on it. :)

    Thanks SO MUCH for your help. It is greatly appreciated.

  4. #4
    Join Date
    Aug 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    removed.
    Last edited by tanyaslogos; 19 Nov 2009 at 12:41 AM.

  5. #5
    Join Date
    Aug 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    For anyone else struggling with this issue.

    This is the part that I removed to get rid of the space and the text.

    Code:
            $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? 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']) . '">' . MORE_INFO_TEXT . '</a>';
            $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' .
    Thanks again Pjb923 for your help - you got me looking at the code differently which made me finally see the light. :)
    Last edited by tanyaslogos; 19 Nov 2009 at 12:46 AM.

  6. #6
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    I'm glad to hear that you got it working. I must have misread your first post and thought you had the entire line bolded. Your code is correct.

    I always struggle with all of the extra linebreaks in the product listing. Thanks for sharing your solution.

  7. #7
    Join Date
    Aug 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: more info link that shows up when item is sold out

    lol no worries - Since I am PHP illiterate I have a difficult time articulating what I need. :)

    Oh and you're welcome for the post of the fix. It wasn't completely selfless on my part - I figure when I forget what I did to fix it I can find the answer on here. :)

    That and I know what it is like to search in vain for answers so I hope this post will keep someone from tearing their hair out.

 

 

Similar Threads

  1. v139h How can an item that has "Sold Out" continue to sell?
    By WetSteve in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 11 Jul 2014, 12:17 AM
  2. v139h How do I alter text that shows when checking out at shipping selection screen?
    By heteromorphic in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 10 Sep 2012, 05:21 AM
  3. v150 Sold Out Button Overlapping More Info Link
    By ravynw34 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Mar 2012, 02:38 PM
  4. Get rid of "More Info" link for sold out items
    By cloudstrife08 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Jan 2010, 03:02 AM
  5. CSS button sold out, overlapping ...more info
    By quantum in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 31 May 2007, 08:59 AM

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