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

    Default Moding "Contact" button

    Is there a way to make "contact" button in showcase mode to "transport" link to the page where it have been clicked into contact form on contact form page?

    Regards

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

    Default Re: Moding "Contact" button

    actually screw that. I will use Javascript and GET method.

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

    Default Re: Moding "Contact" button

    I added this to tpl_contact_us_default.php in your template folder


    <script src="http://code.jquery.com/jquery-

    migrate-1.2.1.min.js"></script>
    <script language="javascript"

    type="text/javascript">

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

    </script>

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

    Default Re: Moding "Contact" button

    Anyone know where in files I can find this "Contact" button fragment that is shown in showcase mode?


    <!--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-->
    I cant I just cant find it here. Its JavaScript or something?
    Last edited by vojtechjan; 7 Mar 2014 at 04:26 PM.

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

    Default Re: Moding "Contact" button

    Showcase "Contact" button generation location
    Thanks to support by lat9 I found out where Contact generation is located
    (its in /includes/functions/functions_general.php)

    what we do now?
    We change one fragment in /includes/functions/functions_general.php starting with "// show case only superceeds all other settings" to
    // show case only superceeds all other settings
    if (STORE_STATUS != '0') {
    return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '" id="LinkyLink">' . TEXT_SHOWCASE_ONLY . '</a>';
    }
    (we add id="LinkyLink")

    And then we swith to our template file - tpl_product_info_display.php
    and then at end we add
    <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function()
    {
    var url = document.location.href;
    var enquiry = "index.php?main_page=contact_us&enquiry="
    var urls = enquiry += url;
    $("#LinkyLink").attr("href", urls);
    });
    </script>
    TADAM. Now we can get and show info about product the user is interested in contact form. (
    Last edited by vojtechjan; 10 Mar 2014 at 01:13 PM.

 

 

Similar Threads

  1. Can't add to cart, instead button says "contact us"
    By runfrombears in forum General Questions
    Replies: 3
    Last Post: 18 Mar 2013, 09:44 AM
  2. 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
  3. How to remove "contact us", "My account" , and "view cart"?
    By thestampnomad in forum Basic Configuration
    Replies: 2
    Last Post: 13 Aug 2010, 07:55 PM
  4. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM
  5. Remove "Contact Us" button from Product Listing
    By xando in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Nov 2006, 04:12 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