Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Product info page - add form

    I am using the Ask a Questions mod as a baseline for a form on my product info page. But instead of a link button taking me to another page to fill out the form, I am trying to include it directly on the product info page. The reason this appeals to me is that I am trying to streamlline the process for my customers.

    From what I gathered, the only way I am able to make it work is to place it below the </form> tag. But this makes my custom form way down below the page. What I have done was to move the </form> tag up to above the product description which now allows me to place my custom form higher up the page.

    Is their anything that I need to know on what side effects can happen by moving that closing form tag? If not, why is the form tags used for the whole product info page?

    Also, if guidance can be given as to what action I would set my form to be to stay on the product info page while still sending the email to me?

  2. #2
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Product info page - add form

    I got the second question figured out as I had to set the link in the zen draw form in the product info. Tested and everything works giving a success message that it was sent and email routed to us.

    My main concern though lies in the way I forced to make it work. This is what I did to allow this form to be put in the product page. I moved the closing form tag at the end of the file:

    PHP Code:
    <!--bof Form close-->
    </
    form>
    <!--
    bof Form close--> 
    It was moved to this place:

    PHP Code:
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == 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 == 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_CARTBUTTON_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_CARTBUTTON_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-->

    <!--bof Form close-->
    </form>
    <!--bof Form close-->

     <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php ?>
    <!--eof Product description -->
    The only other modifciations I did to that page was to move the product description down the page to below the add to cart. So now the </form> is between the add to cart and description. From what I can see and tested, the shopping cart still adds the items to cart. Paypal express also gets the product info. Can anyone shed some light on whether this is a bad workaround and what issues this may cause down the line in terms of functionality. The last thing I want to do is to make the checkout process not work as it would only cause more issues for my customers.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 15 May 2013, 06:00 PM
  2. added a customer reviews form on product-info page, but not working
    By breadfan in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Nov 2009, 05:52 AM
  3. Add product html form code On Product Description page
    By ivogue in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Mar 2009, 07:54 PM
  4. How can modify Product Info page to Contac us Form?
    By JuanJuan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Nov 2007, 01:45 PM
  5. Adding form objects to product info page
    By UnoStar in forum General Questions
    Replies: 0
    Last Post: 26 Jul 2006, 06:32 PM

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