Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Posts
    22
    Plugin Contributions
    0

    Default Price Block Editing

    I'm having trouble trying to place a small note right under my product's price -- which will appear in that spot for each price. If you can just point me to which file to edit, I can take it over from there--I've checked english.php and some of the template files. If you go to the link below you will see the note in red currently residing in my "Add to Cart" box -- that's the note I want to move up the page to just under the price of the product. Any help would be greatly appreciated.

    http://www.qcelabs.com/zencart3/inde...roducts_id=182

    Thank you.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Price Block Editing

    Find this file:-
    tpl_product_info_display.php
    (In INCLUDES/TEMPLATES/TEMPLATE_DEFAULT/TEMPLATES)

    If you are using a custom template, then COPY this file first, then edit it, THEN save it in:-
    INCLUDES/TEMPLATES/YOUR_TEMPLATE/TEMPLATES.

    If this file ALREADY exists in your custom template folder, that's the one you edit...

    (As you will be hard-coding this php file, it's better to put it in an over-rides directory anyway)


    Find this DIV :-
    ---------------------------------------------------------------------------------

    <!--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 -->

    ------------------------------------------------------------------------------
    Then ADD YOUR MESSAGE after the </h2> at the end...

    ?></h2><br /><font color="red">All eligible discounts will be applied when the promotional code is entered at the end of your transaction.</font><br />
    <!--eof Product Price block -->

    ------------------------------------------------------------------------------
    For spacing, use additional <br /> tags as needed. Also, use HEX for color rather than "red". If you want to do things really properly, set a style tag for this line and add the id to your css.
    Last edited by schoolboy; 14 Mar 2007 at 01:16 PM. Reason: correction
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Price Block Editing

    The proper way to do the above is to write a DEFINE statement (See other DEFINES in english.php for the structure), then put the define identifier in the template.php file. This is better than hard-coding the template file. Also, you can alter the text at any time by editing the DEFINE in english.php.
    20 years a Zencart User

  4. #4
    Join Date
    Aug 2006
    Posts
    22
    Plugin Contributions
    0

    Default Re: Price Block Editing

    Schoolboy,
    Excellent advice -- I went through with the hard -coding, but I appreciate the additional as well. It worked like a charm and all is well. Thanks for the rapid response.

  5. #5
    Join Date
    Nov 2006
    Posts
    30
    Plugin Contributions
    0

    help question Re: Price Block Editing

    Hi all I didnt want to start a new thread, seeing as this does a little of what I need.

    I am looking to add titles to my Prices, can this also be added to the price block?

    All my products will be on special offer, so example of what I need will be:

    List Price: £400
    Our Price: £150
    You Save: £250

    First off can this be done, or has someone done similar?

    Regards

  6. #6
    Join Date
    Nov 2006
    Posts
    30
    Plugin Contributions
    0

    help question Re: Price Block Editing

    Ok I have done the You Save bit edited the english.php but do I neeed to create a new define for others?

  7. #7
    Join Date
    Jul 2007
    Location
    Roseville, Michigan
    Posts
    188
    Plugin Contributions
    0

    Default Re: Price Block Editing

    How do you get rid of the "$" in front of the price?
    $299.99
    to
    299.99

    I just need to to show up in a script that I'm running on my site.
    I tried to echo the $one_time, but it gives me the price with the $ and I need it with out it.

 

 

Similar Threads

  1. v150 Block/Unblock Price by SKU/Category in Group Pricing
    By JimmyV in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 17 Feb 2014, 10:51 PM
  2. v151 increase size of Product Price block
    By Andy-C27 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2013, 11:33 PM
  3. Price Block Layout
    By buildingblocks in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 Aug 2010, 06:38 PM
  4. Editing Shipping Price
    By Grind in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Sep 2008, 10:28 PM
  5. Spacing issues with Price, Attributes & Add to Cart block. - FireFox GOOD - IE BAD!
    By Sugarfreegum in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jul 2008, 03:12 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