Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Contact Us form goes to add product?

    Zen Cart v1.3.8a
    I am using the ask a question contribution and contact us pages to email a price quote to the customer. When I go the product page and hover over the button, or push it, it appears to be going to an add to cart page. When I look at the source code, it has the correct URL for the email quote page. I am stumped???

    Here is a link to a product page:
    http://www.superchargersuperstore.co...products_id=76
    Steve

  2. #2
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    im not sure if this is the right spot to ask this question?


  3. #3
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Contact Us form goes to add product?

    It's probably the right spot. I don't know the answer. I've never used the addons you mention, so someone else who's more familiar with them will have to respond.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    Does it make sense that in the source code it shows the correct URL, but when you actually click the button it goes to a different URL?

  5. #5
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    Here is my code...

    This is in the tpl_product_info_display.php
    Code:
    <!--bof Email For Price -->
     <div id="askQuestion" class="biggerText">
    <?php echo zen_draw_form('email_price_quote', zen_href_link(FILENAME_EMAIL_PRICE_QUOTE, 'action=send&products_id=' . $_GET['products_id'])); ?>
    <fieldset id="contactUsForm">
    <legend>Enter Your Email For a Price Quote</legend>
    <label class="inputLabel" for="email-address">Email Address:</label>
    <input type="text" name="email" size="40" id="email-address" />
    <br class="clearBoth" />
    <br /><br />Your email address will not be stored.
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
    </fieldset>
    
    </form></div>
       <br />
       <br class="clearBoth" />
       
    <!--eof Email For Price -->
    Here is my tpl_email_price_quote_default.php

    Code:
    <div class="centerColumn" id="askAQuestion">
    
    <div class="mainContent success">Check your email for our Price Quote!</div>
    
    <div class="buttonRow"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
    
    </div>
    Here is my header_php.php
    Code:
      $valid_product = false;
      if (isset($_GET['products_id'])) {
      	$superstore_price = zen_get_products_display_price((int)$_GET['products_id']);
        $product_info_query = "select pd.products_name, p.products_price, p.products_model
                               from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                               where p.products_status = '1'
                               and p.products_id = '" . (int)$_GET['products_id'] . "'
                               and p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    
        $product_info = $db->Execute($product_info_query);
    
        if ($product_info->RecordCount() > 0) {
          $valid_product = true;
        }
      }
    
      if ($valid_product == false) {
        zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
      }
    
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    
    $error = false;
    if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
    $email_address = zen_db_prepare_input($_POST['email']);
    $zc_validate_email = zen_validate_email($email_address);
    $send_to_name = "Supercharger Superstore Customer";
    $email_subject = "Price Quotation on" . $product_info->fields['products_model'] . "From SuperchargerSuperstore.com";
    $email_text = "";
    $name = "Supercharger Superstore";
    $email_address = "[email protected]";
    
        // Prepare HTML-portion of message
        $html_msg['EMAIL_MESSAGE_HTML'] = '<b>Thank you for enquiring with SuperchargerSuperstore.com!</b><br><br>You requested a price quotation on: ' . $product_info->fields['products_name'] . '<br>Part Number: ' . $product_info->fields['products_model'] . '<br><b>SuperchargerSuperstore price: ' . $superstore_price . '</b><br>MSRP: ' . $product_info->fields['products_price'] . '<br><br>If you would like to purchase this system, <a href="http://www.superchargersuperstore.com/index.php?main_page=index&action=buy_now&products_id=' . $_GET['products_id']) . '">please click here to add it to your shopping cart.</a><br /><br>Thank you,<br><b>The Supercharger Superstore</b><br><br>Please note: Pricing and availability are subject to change at any time without prior notice. Please consult our terms and conditions pages on our website.<br>';
    
        // Send message
        // reuse contact_us form so we get the correct reply-to and don't have
        // to change includes/functions/functions_email.php (which has special
        // hooks for contact_us.
        zen_mail($send_to_name, $email_address, $email_subject, $text_message, $name, $email_address, $html_msg,'contact_us');
    } // end action==send
    
    // include template specific file name defines
    $define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_EMAIL_PRICE_QUOTE, 'false');
    
    $breadcrumb->add(NAVBAR_TITLE);

  6. #6
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    I got an email saying the error had to do with the zen_draw_form line in the page. I tried taking that out and using an html form line and it seemed to do the same thing...

  7. #7
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Contact Us form goes to add product?

    Quote Originally Posted by forced View Post
    Does it make sense that in the source code it shows the correct URL, but when you actually click the button it goes to a different URL?
    Looks like the code checks to see if the products_id is "valid" and if it's not, it redirects to the product page:
    Code:
      if ($valid_product == false) {
        zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
      }
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    Doesn't this header_php.php page get called when the main_page is the "email_price_quote"? This error is happening on the "product_info" page.

  9. #9
    Join Date
    Oct 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: Contact Us form goes to add product?

    I ended up just using the "ask a question" contribution and changing the variables and added the query to pull the retail price and my sale price. Then I changed the email addresses around so that the address entered would get the email with the product pricing.


 

 

Similar Threads

  1. add a contact us form to an ez page
    By Snaggle in forum General Questions
    Replies: 1
    Last Post: 24 Oct 2012, 12:00 PM
  2. v139h Contact Us Form - add text box
    By jt1020 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Jun 2012, 10:21 PM
  3. v139h Add Field to Contact Us Form
    By Donn in forum General Questions
    Replies: 1
    Last Post: 12 Jan 2012, 11:07 PM
  4. Can I add this html contact form to my product description?
    By signify in forum General Questions
    Replies: 5
    Last Post: 19 May 2010, 11:24 PM
  5. add to Contact Us form
    By rhaught in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 Dec 2008, 02:47 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