Results 1 to 10 of 22

Hybrid View

  1. #1

    help question Price Layout Customization ZCV138a

    I am trying to customize my price layout so that it displays like this:



    However I can't seem to figure out how to do it. The code that is calling it within the product display page is

    PHP Code:
    <!--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 -->
    And it currently looks like this:



    Any help on achieving this would greatly be appreciated! Thanks so much!

    J.:
    Last edited by cs_jono; 2 Apr 2010 at 04:41 PM. Reason: Change Image

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Price Layout Customization ZCV138a

    You would need to customize the function in the functions_prices.php for: zen_get_products_display_price

    Be sure to keep backups of the original functions_prices.php as this is not an override file ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3

    Default Re: Price Layout Customization ZCV138a

    Quote Originally Posted by Ajeh View Post
    You would need to customize the function in the functions_prices.php for: zen_get_products_display_price

    Be sure to keep backups of the original functions_prices.php as this is not an override file ...
    Hey Ajeh,

    Thanks for the reply. Do you happen to know exactly how I would need to customize. Sorry I'm not very PHP savvy.

    J.:

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Price Layout Customization ZCV138a

    I would actually have to sit down and write all of the customizations for this function to make the display price work in this manner ... and that can take quite a bit of time ...

    Customizing that function does have a plus side in that once you figure it out ... it works everywhere that the prices are displayed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5

    Default Re: Price Layout Customization ZCV138a

    Ok well thank you for help! If any one else has already customized this page or has the time to do it that would be amazing but there is so much code in the file I have no idea where to start. Thank you!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Price Layout Customization ZCV138a

    I looked through the function and tried to do this the long way ... gads what a nightmare ...

    Then looked at it again and may have a short simple way for you ...

    Find the function in the functions_prices.php

    And locate this part of the code and try it with the change I have in there so you can see the results:
    Code:
        if ($display_normal_price == 0) {
          // don't show the $0.00
          $final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;
        } else {
    //      $final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;
          $final_display_price = 'xNORMAL PRICE' . $show_normal_price . 'x' . 'ySPECIAL' . $show_special_price . 'y' . 'zSALE' . $show_sale_price . 'z' . 'dDISCOUNT' . $show_sale_discount . 'd';
        }
    The letters are to show you the start and end of each price component ...

    You may be able to get away with changing that one line rather than all the code ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7

    help question Moving Saved Percentage Zencart138a

    Hello,

    Does anyone know what code specifically calls the percentage when a product is on sale?

    I'm trying to copy the percentage being displayed here:



    And add it somewhere else on the same page.

    For a better example of what I'm trying to do you can look at:

    http://www.clevershoppers.com/jono/z...roducts_id=180

    I'm trying to leave the you save percentage where it is as well as duplicate it in same area where it says add to cart. Any ideas?


  8. #8

    Default Re: Price Layout Customization ZCV138a

    Maybe you should add more to the category....

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Price Layout Customization ZCV138a

    Didn't we just go through where this code is built?

    You could build a function for this or add a paramater to the existing function so that the default way sends everything and the paramater says just send the percentage ... or whatever you want to do with it ...

    Of, just add the whole price and discount by the add to cart so the customer can always see it ... both where it is now and at the button ...

    Or, you can get even fancier and have the Add to Cart show the current price based on Attributes/Quantity ... and the top say the normal price display ...

    Takes a lot more customization but it does look very cool ... it just depends on how much work you want to put into this or have someone write it for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10

    Default Re: Price Layout Customization ZCV138a

    Ajeh you make my head spin sometimes when you start talking about programming .

    Yeah I knew that's what we have been working with but shouldn't there already be a call function built into place if the product page is calling for that number? If so why couldn't you just copy that function that is already being called and move it on top of the button. The effect we are trying to accomplish is that like this:

    http://www.christianbook.com/pistach...921?event=HPF2

    The way they are putting their percentage with on top of their add to cart button. Thanks so much!

    Quote Originally Posted by Ajeh View Post
    Didn't we just go through where this code is built?

    You could build a function for this or add a paramater to the existing function so that the default way sends everything and the paramater says just send the percentage ... or whatever you want to do with it ...

    Of, just add the whole price and discount by the add to cart so the customer can always see it ... both where it is now and at the button ...

    Or, you can get even fancier and have the Add to Cart show the current price based on Attributes/Quantity ... and the top say the normal price display ...

    Takes a lot more customization but it does look very cool ... it just depends on how much work you want to put into this or have someone write it for you ...

 

 

Similar Threads

  1. Layout Customization
    By faithtong in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 20 Mar 2009, 01:42 AM
  2. Layout box customization..
    By nekosgrace in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Oct 2006, 01:43 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