Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2014
    Posts
    35
    Plugin Contributions
    0

    Default Showcase "Contact" button generation location

    Moding "Contact" button

    Hi!
    Anyone know where is this function for generation of "contact" button for "showcase" located on ZenCart?

    Regards

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Showcase "Contact" button generation location

    Don't know what you are referencing by "showcase"

    But that function is in this file tpl_contact_us_default.php
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2014
    Posts
    35
    Plugin Contributions
    0

    Default Re: Showcase "Contact" button generation location

    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
    // do nothing
    } else {
    ?>
    <?php
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
    if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
    // hide the quantity box and default to 1
    $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    } else {
    // show the quantity box
    $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    }
    $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
    ?>
    <?php if ($display_qty != '' or $display_button != '') { ?>
    <div id="cartAdd">
    <?php
    echo $display_qty;
    echo $display_button;
    ?>
    </div>
    <?php } // display qty and button ?>
    <?php } // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    Thanks but this much I already know. The thing I do not know is where in it is this part that generates "Contact" button with link to /index.php?main_page=contact_us ?
    Cause I want to add JQuery script tak changes link to for example:
    index.php?main_page=contact_us&enquiry=zen-cart.com/showthread.php?212451-Moding-quot-Contact-quot-button&p=1239671#post1239671

    and then I have this script that get content of adress bar into form on contact page. And this works. Now I need to generate links and my job would be done.

    $(document).ready(function()
    {
    var url=window.location.search.substring(1);;
    if (url.indexOf("&enquiry=") != -1)
    {

    var url=window.location.search.substring(1);;
    var urls=url.substr(url.lastIndexOf ('&enquiry=')+9,url.length);
    var tekst = "Contact about offer: "
    var newtext = tekst += urls;
    $("[name=enquiry]").text(newtext);
    }
    else
    {


    }
    });
    Last edited by vojtechjan; 9 Mar 2014 at 08:24 AM.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: Showcase "Contact" button generation location

    The function zen_get_buy_now_button, present in /includes/functions/functions_general.php (a core-file, so be sure the make a proper backup if you're going to make changes).

  5. #5
    Join Date
    Jan 2014
    Posts
    35
    Plugin Contributions
    0

    Default Re: Showcase "Contact" button generation location

    Thanks a lot!. Now I know where I should add ID that I will operate on with JScript. (and as it is only ID attribute it will not hurt anything)

    // show case only superceeds all other settings
    if (STORE_STATUS != '0') {
    return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '" id="daLinkyLink">' . TEXT_SHOWCASE_ONLY . '</a>';
    }
    Last edited by vojtechjan; 10 Mar 2014 at 11:55 AM.

 

 

Similar Threads

  1. v139h "Contact Us" page missing "Submit" button - please help!
    By lucky-nz in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 20 Feb 2013, 10:24 PM
  2. Disable "Contact Us Link" On Showcase Store
    By wdd49 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2010, 04:05 PM
  3. Can I remove the "contact us" text when in showcase mode?
    By Rob905 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Feb 2009, 06:04 AM
  4. Delete "Contact Us" link/box from listings in showcase mode
    By untitled10101 in forum General Questions
    Replies: 4
    Last Post: 21 Sep 2008, 12:48 AM
  5. Edit "Contact Us" in Showcase mode
    By techmon in forum Basic Configuration
    Replies: 3
    Last Post: 17 Mar 2008, 09:41 PM

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