Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Have a Drink change order price and add to cart

    Hi there,
    I would like to change the order in which the price and add to cart are displayed - basically reverse the order so that the add to cart is on top of the price.
    Looked in the FAQ but with no luck

    Thanks


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

    Default Re: change order price and add to cart

    We'll need a link to your site so we can see what template you're using.

  3. #3
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: change order price and add to cart

    Here is the link
    http://www.naturatrading.ca

    Thanks

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

    Default Re: change order price and add to cart

    The standard method will work for you - edit
    /includes/templates/your_template/templates/tpl_product_info_display.php and move the code block marked with
    <!--bof Product Price block -->
    and
    <!--eof Product Price block -->

    to below

    <!--eof Add to Cart Box -->

  5. #5
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: change order price and add to cart

    I have tried the method below and it seems to make no difference. I have moved the code block in all instances of tpl_product_info_display.php
    What am I doing wrong?- Any other ideas?
    Thanks


    Quote Originally Posted by gjh42 View Post
    The standard method will work for you - edit
    /includes/templates/your_template/templates/tpl_product_info_display.php and move the code block marked with
    <!--bof Product Price block -->
    and
    <!--eof Product Price block -->

    to below

    <!--eof Add to Cart Box -->

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

    Default Re: change order price and add to cart

    You have h2#productPrices unstyled and #cartAdd floated right. They can both be at the same level while floating this way, so they do. You need to float them both the same way if you want them vertically aligned. Also, you will need the price to clear right so it goes below #cartAdd instead of right next to it.

    In your stylesheet, find and modify or add

    h2#productPrices {
    float: right;
    clear: right;
    }

    (Tested on your site and works.)

  7. #7
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: change order price and add to cart

    What I really wanted to change is when a category is listed, and there are products shown, I would like to reverse the add to cart and price - the price is positioned too high so it is confusing to customers.
    Thanks for your help!
    Last edited by sneakyP; 24 Aug 2008 at 06:18 PM. Reason: add screenshot

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

    Default Re: change order price and add to cart

    Find this section in /includes/modules/your_template/product_listing.php:
    PHP Code:
            case 'PRODUCT_LIST_PRICE':
            
    $lc_price zen_get_products_display_price($listing->fields['products_id']) . '<br />';
            
    $lc_align 'right';
            
    $lc_text =  $lc_price;

            
    // more info in place of buy now
            
    $lc_button '';
            if (
    zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              
    $lc_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' MORE_INFO_TEXT '</a>';
            } else {
              if (
    PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
                if (
                    
    // not a hide qty box product
                    
    $listing->fields['products_qty_box_status'] != &&
                    
    // product type can be added to cart
                    
    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                    
    &&
                    
    // product is not call for price
                    
    $listing->fields['product_is_call'] == 0
                    
    &&
                    
    // product is in stock or customers may add it to cart anyway
                    
    ($listing->fields['products_quantity'] > || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
                  
    $how_many++;
                }
                
    // hide quantity box
                
    if ($listing->fields['products_qty_box_status'] == 0) {
                  
    $lc_button '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_BUY_NOWBUTTON_BUY_NOW_ALT'class="listingBuyNowButton"') . '</a>';
                } else {
                  
    $lc_button TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART "<input type=\"text\" name=\"products_id[" $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
                }
              } else {
    // qty box with add to cart button
                
    if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  
    $lc_buttonzen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' $listing->fields['products_id']), 'post''enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' zen_draw_hidden_field('products_id'$listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT) . '</form>';
                } else {
                  
    $lc_button '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_BUY_NOWBUTTON_BUY_NOW_ALT'class="listingBuyNowButton"') . '</a>';
                }
              }
            }
            
    $the_button $lc_button;
            
    $products_link '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' MORE_INFO_TEXT '</a>';
            
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            
    $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON '<br />' '') : '');

            break; 
    and switch add & price code like this:
    PHP Code:
            case 'PRODUCT_LIST_PRICE':
            
    $lc_price zen_get_products_display_price($listing->fields['products_id']) . '<br />';
            
    $lc_align 'right';
            
    $lc_text =  '';//$lc_price;//price moved down

            // more info in place of buy now
            
    $lc_button '';
            if (
    zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              
    $lc_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' MORE_INFO_TEXT '</a>';
            } else {
              if (
    PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
                if (
                    
    // not a hide qty box product
                    
    $listing->fields['products_qty_box_status'] != &&
                    
    // product type can be added to cart
                    
    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                    
    &&
                    
    // product is not call for price
                    
    $listing->fields['product_is_call'] == 0
                    
    &&
                    
    // product is in stock or customers may add it to cart anyway
                    
    ($listing->fields['products_quantity'] > || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
                  
    $how_many++;
                }
                
    // hide quantity box
                
    if ($listing->fields['products_qty_box_status'] == 0) {
                  
    $lc_button '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_BUY_NOWBUTTON_BUY_NOW_ALT'class="listingBuyNowButton"') . '</a>';
                } else {
                  
    $lc_button TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART "<input type=\"text\" name=\"products_id[" $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
                }
              } else {
    // qty box with add to cart button
                
    if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  
    $lc_buttonzen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' $listing->fields['products_id']), 'post''enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' zen_draw_hidden_field('products_id'$listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT) . '</form>';
                } else {
                  
    $lc_button '<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_BUY_NOWBUTTON_BUY_NOW_ALT'class="listingBuyNowButton"') . '</a>';
                }
              }
            }
            
    $the_button $lc_button;
            
    $products_link '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' MORE_INFO_TEXT '</a>';
            
    $lc_text .= '<br />' zen_get_buy_now_button($listing->fields['products_id'], $the_button$products_link) . '<br />' zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            
    $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON '<br />' '') : '');
            
    $lc_text .=  $lc_price;//new location of price
            
    break; 

 

 

Similar Threads

  1. Replies: 0
    Last Post: 22 Jul 2011, 04:00 PM
  2. How can I change the position of the product price and Add to Cart?
    By pennylane in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 11 Sep 2009, 02:26 AM
  3. Check/money order clone and add 1 euro to total price
    By mambo75 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 6 Aug 2009, 05:14 PM
  4. No Price Display-Add to Cart and Order
    By myhandbaghouse in forum Managing Customers and Orders
    Replies: 5
    Last Post: 25 Feb 2009, 02:42 AM
  5. Add to Cart and Price
    By abcoombe in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Oct 2008, 10:09 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