Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Different drop-down displays on attributes with recurring v. one-time price

    This problem isn't earth-shattering,

    just nagging. When I enter attribute prices through the Attributes Controller, if the price is recurring (applied to multiple quantities purchased), the attribute and price display nicely in my drop-down menus. For example, if people must pay $5.50 more for a super-large cookie (for *each* cookie that they buy), the attribute displays thus in the drop-down menu:

    Super-Large Cookie (+$5.50)

    If, on the other hand, I enter a *one-time* price for an attribute (say, a one-time shipping surcharge to Alaska/Hawaii, applied only once to an order, no matter how many items are ordered), the attribute displays poorly in the drop-down menu, thus:

    Alaska/Hawaii Delivery$12.50

    I've scoured the tpl_product_info_display.php file, but I can't seem to find the lines that control the one-time price display. I also searched the forum, of course, but frankly I didn't even know what to look for. All I want to do is make the one-time price attribute look the same as the regular price attribute in my drop-down menus. Any direction would be much appreciated.

    KenBaker

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Different drop-down displays on attributes with recurring v. one-time price

    How exactly do you want it to display?

    Just guessing, but you could maybe change /includes/modules/name_of_your_template_here/attributes.php
    around line 146
    Code:
                          $price_onetime = TEXT_ONETIME_CHARGE_SYMBOL . ATTRIBUTES_PRICE_DELIMITER_PREFIX . $currencies->display_price($new_onetime_charges, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
    Last edited by Ajeh; 1 Feb 2013 at 03:28 PM.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2012
    Posts
    66
    Plugin Contributions
    0

    Default Re: Different drop-down displays on attributes with recurring v. one-time price

    DrByte,

    Thanks kindly for the direction, which allowed me to fix this little issue. I needed a day or so of puzzling over your direction, as I couldn't find the exact line of code that you referred to. Of *course* I couldn't, because you meant that I should *add* the red text to the existing code. When I did so, attributes with one-time prices now display *just as do* the attributes with recurring prices.

    To answer your question (now moot), "How exactly do you want it to display?", I wanted the attributes with one-time prices to display *just the same* as the attributes with recurring prices. In my original post, I gave these two examples:

    Display, attributes with recurring prices: Super-Large Cookie (+$5.50)
    Display, attributes with one-time prices: Alaska/Hawaii Delivery$12.50

    As you can see, the display for attributes with recurring prices is attractive and easily read, while the display for attributes with one-time prices is smushed together and harder to read. When, however, I made your suggested changes to the attributes.php file, both displays look exactly the same, to wit:

    Display, attributes with recurring prices: Super-Large Cookie (+$5.50)
    Display, attributes with one-time prices: Alaska/Hawaii Delivery ($12.50)

    To my mind (which has been accused of being entirely too tidy and persnickety about the little things), this standardized display of attributes (whether with recurring or one-time prices) should be the standard display built into ZenCart.

    But no matter, as I am now a happy camper with my attributes drop-down menus, which point allows me to close by thanking you once again for the direction. As with practically everything in the world, the solution's quite simple when someone points it out to you.

    Regards,

    KenBaker

 

 

Similar Threads

  1. Replies: 5
    Last Post: 10 Aug 2013, 07:14 PM
  2. Can I change price attributes in all products at one time?
    By dat311 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Jan 2012, 05:26 PM
  3. Showing total price in attributes drop-down
    By kazbryan in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 12 Apr 2011, 03:31 PM
  4. Creating A Drop Down Menu With Delivery time
    By watzursn in forum General Questions
    Replies: 0
    Last Post: 10 Oct 2008, 05:12 PM
  5. Drop down with only one value in attribute
    By justinae in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Dec 2007, 06:08 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR