Results 1 to 5 of 5

Thread: Move Quantity Price Box to left under product name.

  1. #1
    Active Member
    Move Quantity Price Box to left under product name.


    Join Date
    Jul 2011
    Posts
    228
    Total Contributions For

    DanDan     $ 20.00
    Rep Power
    17


    Default Move Quantity Price Box to left under product name.

    I need to move the Quantity Price Break box to the left side of the page, under the product name but I have searched and cannot find a way to move it. How can I move it to the left?

    Thanks,

    Dan

  2. #2
    Active Member
    Move Quantity Price Box to left under product name.


    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    476
    Total Contributions For

    JRR     $ 180.00
    Rep Power
    67


    Default Re: Move Quantity Price Box to left under product name.

    Hi Dan,

    Are you talking about the product page your potential customer sees? If so you can move the stuff around on the top line and add or remove extra bits. I added the part number below the product name on my site (example here) to make it easier for customer to see. Moving requires you to edit the catalog/templates/fallback/content/product_info.tpl.php page (not ideal, ideally you create a new template page copied from catalog/templates/fallback/content/product_info.tpl.php with your mods and put it in the user modified templates like this: catalog/templates/<your template directory>/content/product_info.tpl.php - set that in admin.

    For my example around line 151 which was:
    Code:
                    <td class="productinfo_header" colspan="3">
              <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                  <td class="pageHeading" valign="top" width="70%"><?php echo $product_info['products_name'] . $min_order_text; ?></td>
                  <td class="pageHeading" align="right" valign="top">
                  <?php 
                  if ( ($hi_product_price == CALL_FOR_PRICE_VALUE) || ($lo_product_price == CALL_FOR_PRICE_VALUE) ){
                    echo '<a href="' . tep_href_link(FILENAME_CONTACT_US, 'enquiry=' . TEXT_QUESTION_PRICE_ENQUIRY . '%0D%0A%0D%0A' . TEXT_QUESTION_MODEL . '%20' . str_replace(' ', '%20', $product_info['products_model']) . '%0D%0A' .  TEXT_QUESTION_PRODUCT_NAME . '%20' . str_replace(' ', '%20', $product_info['products_name']) . '%0D%0A' . TEXT_QUESTION_PRODUCT_ID . '%20' .  $product_info['products_id'] .'%0D%0A%0D%0A') . '">' . $products_price . '</a>';
                  } elseif ($product_info['products_status'] == '2') {
                    echo TEXT_PRODUCT_DISCONTINUED;
                  } else { echo $products_price; }?>
                  </td>  
                </tr>
              </table>
            </td>
    I changed it to this:
    Code:
                   <td class="productinfo_header" colspan="3">
              <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <tr>
               <?php //   added  "<br>" . "Model: " . $product_info['products_model'] . so Model # would show and be on a new line (for long names) ?>
                  <td class="pageHeading" valign="top" width="70%"><?php echo $product_info['products_name'] . "<br>" . "Model: " . $product_info['products_model'] . $min_order_text; ?></td>
                  <td class="pageHeading" align="right" valign="top">
                  <?php 
                  if ( ($hi_product_price == CALL_FOR_PRICE_VALUE) || ($lo_product_price == CALL_FOR_PRICE_VALUE) ){
                    echo '<a href="' . tep_href_link(FILENAME_CONTACT_US, 'enquiry=' . TEXT_QUESTION_PRICE_ENQUIRY . '%0D%0A%0D%0A' . TEXT_QUESTION_MODEL . '%20' . str_replace(' ', '%20', $product_info['products_model']) . '%0D%0A' .  TEXT_QUESTION_PRODUCT_NAME . '%20' . str_replace(' ', '%20', $product_info['products_name']) . '%0D%0A' . TEXT_QUESTION_PRODUCT_ID . '%20' .  $product_info['products_id'] .'%0D%0A%0D%0A') . '">' . $products_price . '</a>';
                  } elseif ($product_info['products_status'] == '2') {
                    echo TEXT_PRODUCT_DISCONTINUED;
                  } else { echo $products_price; }?>
                  </td>  
                </tr>
              </table>
            </td>
    So, look around the file, see if you can find where it stuffs in the Quantity Price box and play with it - I recommend using Localhost or a hidden catalog on your web site for development as you don't want to scar your customers with the broken pages that will result until you get the bugs ironed out.

    Oh, and how the templates are used is explained better here - BTS - Basic Template System. I haven't really used the templates as I should be, and as such have modified code in the wrong places which will byte me when I have to upgrade...
    Hope this is somewhat clear...
    Last edited by JRR; 08-10-2016 at 10:31 PM. Reason: added example

  3. #3
    Active Member
    Move Quantity Price Box to left under product name.


    Join Date
    Jul 2011
    Posts
    228
    Total Contributions For

    DanDan     $ 20.00
    Rep Power
    17


    Default Re: Move Quantity Price Box to left under product name.

    Thanks for your help but the solution is not on that page. After working with it with no solution I found the answer in /includes/classes/PriceFormatter.php, on line 324:

    $lc_text = '<table border="0" cellspacing="0" cellpadding="0" class="infoBox" align="right">

    I changed right to left and solved it.

  4. #4
    Active Member
    Move Quantity Price Box to left under product name.


    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    476
    Total Contributions For

    JRR     $ 180.00
    Rep Power
    67


    Default Re: Move Quantity Price Box to left under product name.

    Good hunting! The thing is to keep good notes so the next upgrade of osCmax doesn't simply erase your changes. That is why they are trying to get us to use the BTS so any changes are not in the core program - other than bug fixes.

  5. #5
    ejsolutions
    Guest


    Post Re: Move Quantity Price Box to left under product name.

    Quote Originally Posted by DanDan View Post
    ... I found the answer in /includes/classes/PriceFormatter.php, on line 324:
    PHP Code:
          $lc_text '<table border="0" cellspacing="0" cellpadding="0" class="infoBox" align="right"> 
    I changed right to left and solved it.
    I'd say that's the correct place to make the change. IMHO it is badly implemented and the priceformatter styling should be separated from the infobox class. Long term, it would be better as:
    PHP Code:
          $lc_text '<table border="0" cellspacing="0" cellpadding="0" class="priceFormatter"> 
    Then the style could be changed with CSS and with the BTS stylesheet, for any given template.
    (Small fry compared to other issues.)

Similar Threads

  1. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-01-2007, 03:10 PM
  2. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-22-2007, 04:37 PM
  3. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-22-2007, 12:00 PM
  4. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-20-2007, 10:02 PM
  5. Move Left Column Down
    By torweb in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 05-01-2006, 03:15 PM

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
  •