Results 1 to 7 of 7
  1. #1

    Default Product Description Page Question

    I am completely stumped on this one. I finally have my description page laid out perfectly. But it's not perfect on all of my pages.

    For example this is how it's supposed to look like (look closely at the tell a friend and write a review button) http://frompropertorocker.com/index....oducts_id=2338

    then here where it's messed up: http://frompropertorocker.com/index....oducts_id=2417

    I have noticed that those buttons lay like that only on the products that don't have any attributes.

    here is what my tpl_product_info_display.php says:
    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=product_info.<br />
     * Displays details of a typical product
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_product_info_display.php 16242 2010-05-08 16:05:40Z ajeh $
     */
     //require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
    ?>
    <div class="centerColumn" id="productGeneral">

    <!--bof Form start-->
    <?php echo zen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'$request_type), 'post''enctype="multipart/form-data"') . "\n"?>
    <!--eof Form start-->

    <?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>

    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
     * display the category icons
     */
    require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
    <?php 
    ?>
    <!--eof Category Icon -->

    <!--bof Prev/Next top position -->
    <?php if (PRODUCT_INFO_PREVIOUS_NEXT == or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
    <?php
    /**
     * display the product previous/next helper
     */
    require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
    <?php 
    ?>
    <!--eof Prev/Next top position-->

    <!--bof Main Product Image -->
    <?php
      
    if (zen_not_null($products_image)) {
      
    ?>
    <?php
    /**
     * display the main product image
     */
       
    require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
    <?php
      
    }
    ?>
    <!--eof Main Product Image-->

    <!--bof Product Name-->
    <h1 id="productName" class="productGeneral"><?php echo $products_name?></h1>
    <!--eof Product Name-->



    <!--bof Product Price block -->
    <h2 id="productPrices" class="productGeneral">
    <?php
    // base price
      
    if ($show_onetime_charges_description == 'true') {
        
    $one_time '<span >' TEXT_ONETIME_CHARGE_SYMBOL TEXT_ONETIME_CHARGE_DESCRIPTION '</span><br />';
      } else {
        
    $one_time '';
      }
      echo 
    $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE '') . zen_get_products_display_price((int)$_GET['products_id']);
    ?></h2>
    <!--eof Product Price block -->

    <!--bof free ship icon  -->
    <?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON?></div>
    <?php ?>
    <!--eof free ship icon  -->

     <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php ?>
    <!--eof Product description -->
    <br class="clearBoth" />

    <!--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;
                
    ?>
    <!-- AddThis Button END -->
    <!-- BEGIN MyGiftList Code --> 
    <div id="registry">
    <input type="image" onclick='javascript:zenMGLpopup(this.form,"FROMPROP2405","From Proper to Rocker","zen-cart");return false;' src="http://www.frompropertorocker.com/images/add.gif" width=118 height=35 border=0 alt="Click to Add to your Registry"> 

    <textarea rows=1 cols=10 name=giftName style="display:none"><?php echo $products_name?></textarea>
    <input type=hidden name=giftPrice value="<?php echo $specials_price $specials_price $products_price?>">

    <textarea rows=1 cols=10 name=giftDescription style="display:none"><?php echo $products_model " " Stripslashes(substr($products_description,0,50)); ?></textarea>
    <input type=hidden name=giftImage value='<?php echo DIR_WS_IMAGES $products_image?>'>

    <script language=javascript> 
    function zenMGLpopup(f, refsource, storename, cartname) { 
        var giftPrice = ""; 
        var giftName = ""; 
        var giftDescription = ""; 
        var m; 
        var u = ""; 
        var n; 
        
        if (f) { 
            giftPrice = f.giftPrice.value;
            giftName = f.giftName.value;
            giftDescription = f.giftDescription.value;
          
            for (var i = 0; i < f.elements.length; i++) {
                m = f.elements[i].selectedIndex; 
                n = f.elements[i].name

                if (m > -1) { 
                    u = u + f.elements[i].options[m].text + ", "; 
                } 
                if (f.elements[i].name == "cart_quantity" ) { 
                    u = u + "Quantity=" + f.elements[i].value + ", "; 
                } 
            } 
        }
        if ( u != "" ) { 
          u = u.substr(0, u.length-2); 
          u = "I would like these options: " + u; 
          giftDescription = u + ".  " + giftDescription; 
        } 

        u = "http://www.mygiftlist.com/register_gift.asp?refSource=" + escape(refsource) + "&giftURL=" + escape(document.URL) + "&giftName=" + escape(giftName) + "&giftRetailer=" + escape(storename) + "&giftCart=" + escape(cartname) + "&giftPrice=" + escape(giftPrice) + "&giftDescription=" + escape(giftDescription); 
        var mgl = window.open(u,"MGL","width=720,height=500,top=60,left=100,resizable,scrollbars"); 

    </script> 
    </div>
    <!-- End MyGiftList Code -->
    <input type=hidden name=giftRetailer value="From Proper to Rocker"> 
    <input type=hidden name=RefSource value="FROMPROP2405"> 
    <div id="askQuestion" class="biggerText">
    <?php
    echo '<a href="' zen_href_link(FILENAME_ASK_A_QUESTION'products_id=' $_GET['products_id']) . '">' .
    zen_image_button(BUTTON_IMAGE_ASK_A_QUESTIONBUTTON_ASK_A_QUESTION_ALT) . '</a>'?>
    </div>
    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style ">
    <a class="addthis_button_preferred_1"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_email"></a>
    <a class="addthis_button_compact"></a>
    <a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e03525a3a1f17eb"></script>
              </div>
      <?php // display qty and button ?>
    <?php 
    // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    <!--bof Product details list  -->
    <?php if ( (($flag_show_product_info_model == and $products_model != '') or ($flag_show_product_info_weight == and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight !=0) ? '<li>' TEXT_PRODUCT_WEIGHT .  $products_weight TEXT_PRODUCT_WEIGHT_UNIT '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->

    <!--bof Attributes Module -->
    <?php
      
    if ($pr_attr->fields['total'] > 0) {
    ?>
    <?php
    /**
     * display the product atributes
     */
      
    require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
    <?php
      
    }
    ?>
    <!--eof Attributes Module -->

    <!--bof Quantity Discounts table -->
    <?php
      
    if ($products_discount_type != 0) { ?>
    <?php
    /**
     * display the products quantity discount
     */
     
    require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
    <?php
      
    }
    ?>
    <!--eof Quantity Discounts table -->

    <!--bof Additional Product Images -->
    <?php
    /**
     * display the products additional images
     */
      
    require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
    <!--eof Additional Product Images -->

    <!--bof Prev/Next bottom position -->
    <?php if (PRODUCT_INFO_PREVIOUS_NEXT == or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
    <?php
    /**
     * display the product previous/next helper
     */
     
    require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
    <?php 
    ?>
    <!--eof Prev/Next bottom position -->
    <hr id="product-divider" />

    <!--bof Tell a Friend button -->
    <?php
      
    if ($flag_show_product_info_tell_a_friend == 1) { ?>
    <div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == '<a href="' zen_href_link(FILENAME_TELL_A_FRIEND'products_id=' $_GET['products_id']) . '">' zen_image_button(BUTTON_IMAGE_TELLAFRIENDBUTTON_TELLAFRIEND_ALT) . '</a>' ''); ?></div>
    <?php
      
    }
    ?>
    <!--eof Tell a Friend button -->

    <!--bof Reviews button and count-->
    <?php
      
    if ($flag_show_product_info_reviews == 1) {
        
    // if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
        
    if ($reviews->fields['count'] > ) { ?>
    <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' zen_href_link(FILENAME_PRODUCT_REVIEWSzen_get_all_get_params()) . '">' zen_image_button(BUTTON_IMAGE_REVIEWSBUTTON_REVIEWS_ALT) . '</a>'?></div>
    <br class="clearBoth" />
    <p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == TEXT_CURRENT_REVIEWS ' ' $reviews->fields['count'] : ''); ?></p>
    <?php } else { ?>
    <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITEzen_get_all_get_params(array())) . '">' zen_image_button(BUTTON_IMAGE_WRITE_REVIEWBUTTON_WRITE_REVIEW_ALT) . '</a>'?></div>
    <br class="clearBoth" />
    <?php
      
    }
    }
    ?>
    <!--eof Reviews button and count -->
    <!--bof Product date added/available-->
    <?php
      
    if ($products_date_available date('Y-m-d H:i:s')) {
        if (
    $flag_show_product_info_date_available == 1) {
    ?>
      <p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLEzen_date_long($products_date_available)); ?></p>
    <?php
        
    }
      } else {
        if (
    $flag_show_product_info_date_added == 1) {
    ?>
          <p id="productDateAdded" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_ADDEDzen_date_long($products_date_added)); ?></p>
    <?php
        
    // $flag_show_product_info_date_added
      
    }
    ?>
    <!--eof Product date added/available -->

    <!--bof Product URL -->
    <?php
      
    if (zen_not_null($products_url)) {
        if (
    $flag_show_product_info_url == 1) {
    ?>
        <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATIONzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_url), 'NONSSL'truefalse)); ?></p>
    <?php
        
    // $flag_show_product_info_url
      
    }
    ?>
    <!--eof Product URL -->
    <!-- bof Ultimate Cross Sell Combo -->
    <?php require($template->get_template_dir('tpl_modules_ultimate_cross_sells.php'DIR_WS_TEMPLATE$current_page_base,'templates'). '/' 'tpl_modules_ultimate_cross_sells.php'); ?>
    <!-- bof Ultimate Cross Sell Combo -->
    <!--bof also purchased products module-->
    <?php require($template->get_template_dir('tpl_modules_also_purchased_products.php'DIR_WS_TEMPLATE$current_page_base,'templates'). '/' 'tpl_modules_also_purchased_products.php');?>
    <!--eof also purchased products module-->

    <!--bof Form close-->
    </form>
    <!--bof Form close-->
    <?php // BEGIN CEON BACK IN STOCK NOTIFICATIONS 2 of 2
    if (isset($back_in_stock_notification_build_form) && $back_in_stock_notification_build_form) {
      
    // Build the notification request form
      
      /**
       * Load the template class
       */
      
    require_once(DIR_FS_CATALOG DIR_WS_CLASSES 'class.CeonXHTMLHiTemplate.php');
      
      
    // Load in and extract the template parts for Back In Stock Notification functionality
      
    $bisn_template_filename $template->get_template_dir('inc.html.back_in_stock_notifications.html',
        
    DIR_WS_TEMPLATE$current_page_base'templates') . '/' .
        
    'inc.html.back_in_stock_notifications.html';
      
      
    $bisn_template = new CeonXHTMLHiTemplate($bisn_template_filename);
      
      
    $bisn_template_parts $bisn_template->extractTemplateParts();
      
      
    $back_in_stock_notification_form = new CeonXHTMLHiTemplate;
      
      
    // Load in the source for the form
      
    $back_in_stock_notification_form->setXHTMLSource(
        
    $bisn_template_parts['PRODUCT_INFO_BACK_IN_STOCK_NOTIFICATION_FORM']);
      
      
    // Add the form action, titles, labels and button
      
    $form_start_tag zen_draw_form('back_in_stock_notification',
        
    zen_href_link(FILENAME_BACK_IN_STOCK_NOTIFICATION_SUBSCRIBEzen_get_all_get_params(),
        
    'NONSSL'), 'POST');
      
    $back_in_stock_notification_form->setVariable('back_in_stock_notification_form_start_tag',
        
    $form_start_tag);
      
      
    $product_back_in_stock_notification_form_title BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_TITLE;
      
    $back_in_stock_notification_form->setVariable('title',
        
    $product_back_in_stock_notification_form_title);
      
      
    $name_label BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_ENTRY_NAME;
      
    $email_label BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_ENTRY_EMAIL;
      
    $email_confirmation_label BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_ENTRY_CONFIRM_EMAIL;
      
    $back_in_stock_notification_form->setVariable('name_label'$name_label);
      
    $back_in_stock_notification_form->setVariable('email_label'$email_label);
      
    $back_in_stock_notification_form->setVariable('email_confirmation_label',
        
    $email_confirmation_label);
      
      
    $submit_button zen_image_submit(BUTTON_IMAGE_NOTIFY_MEBUTTON_NOTIFY_ME_ALT,
        
    'name="notify_me"');
      
    $back_in_stock_notification_form->setVariable('submit_button'$submit_button);
      
      
    // Add in the introductory text
      
    $intro_text sprintf(BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_INTRO,
        
    htmlentities($products_nameENT_COMPATCHARSET));
      
    $notice_text BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_NOTICE;
      
    $back_in_stock_notification_form->setVariable('intro'$intro_text);
      
    $back_in_stock_notification_form->setVariable('notice'$notice_text);
      
      
    // Add the customer's details to the form (empty unless logged in)
      
    $back_in_stock_notification_form->setVariable('name',
        
    $back_in_stock_notification_form_customer_name);
      
    $back_in_stock_notification_form->setVariable('email',
        
    $back_in_stock_notification_form_customer_email);
      
    $back_in_stock_notification_form->setVariable('cofnospam',
        
    $back_in_stock_notification_form_customer_email_confirmation);
      
      print 
    $back_in_stock_notification_form->getXHTMLSource();
    }
    // END CEON BACK IN STOCK NOTIFICATIONS 2 of 2 ?>
    </div>
    Any ideas on how to fix it so it looks like the first link? Thanks!

    Oh and I have the newest version of zen cart in case you needed to know. :)

  2. #2

    Default Re: Product Description Page Question

    Also I just noticed that my additional images are all funky too. They aren't laying out horizontally like I want them to.

    Example: http://frompropertorocker.com/index....oducts_id=2311

    Thanks!

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Product Description Page Question

    Your first issue looks as I would expect it to. You don't have attributes or additional images on that page, so those buttons are moving up into that space. Maybe if you moved those buttons below the Add to Cart section in the template file.

    For the second, try adding float: left; to #productAdditionalImages.

  4. #4

    Default Re: Product Description Page Question

    Quote Originally Posted by stevesh View Post
    Your first issue looks as I would expect it to. You don't have attributes or additional images on that page, so those buttons are moving up into that space. Maybe if you moved those buttons below the Add to Cart section in the template file.

    For the second, try adding float: left; to #productAdditionalImages.
    Thank you for replying. I do have them below the Add to Cart Section and I added the float:left; to #productAdditionalImages but that made it look worse.

  5. #5

    Default Re: Product Description Page Question

    I think I figured it out. I added this code <br class="clearBoth"> under <!--eof Additional Product Images --> and under <!--eof Attributes Module -->. So far it looks like it's supposed to. I need to check the rest to make sure but I think I got it. :)

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Product Description Page Question

    The easier way to do that, without touching the PHP files, would be to add clear: both; to the #productTellFriendLink {} and #productAdditionalImages {} rules.

  7. #7

    Default Re: Product Description Page Question

    Quote Originally Posted by gjh42 View Post
    The easier way to do that, without touching the PHP files, would be to add clear: both; to the #productTellFriendLink {} and #productAdditionalImages {} rules.
    Oh I didn't think of that. I'll do that. Thanks!

 

 

Similar Threads

  1. v139h Short Description problems - no description on product list page
    By jgold723 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Oct 2014, 05:52 AM
  2. product description question
    By ilovedoingwebsites in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 31 May 2011, 11:23 PM
  3. Product page question (description cross selling)
    By DigitalShadow in forum General Questions
    Replies: 2
    Last Post: 20 Oct 2009, 09:29 PM
  4. Product description question
    By afo in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 4 Sep 2008, 11:35 PM
  5. Product Description Question
    By hottytoddysummer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Mar 2008, 08:29 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