Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2011
    Posts
    582
    Plugin Contributions
    0

    Default Hide Product Attribute Option Price (+XX.XX)

    I am trying to hide the product attribute option that is displayed at the end of each attibute.

    how can i remove the (+XX.XX) on my attributes?

    I came across a few solutions but none worked for me. (most are like 10 years old or so)

    Thank you

  2. #2
    Join Date
    Apr 2011
    Posts
    582
    Plugin Contributions
    0

    Default Re: Hide Product Attribute Option Price (+XX.XX)

    found it i think

    This option seems to work so far

    https://www.zen-cart.com/showthread....-(-%C2%A37-50)

  3. #3
    Join Date
    Jul 2012
    Posts
    16,812
    Plugin Contributions
    17

    Default Re: Hide Product Attribute Option Price (+XX.XX)

    That edit certainly works for the majority of the pricing display and it becomes obvious when performing an upgrade that there is a change or difference. Provided you keep the edit just where was suggested, yes many years ago, then plugins can still jump in as necessary or desired as long as you keep making that edit to the most recent version of that file.

    An alternative may be to use an observer to adjust that price or other information. I'm not sure if load sequencing has been resolved (ensuring all observers in the same load sequence number are loaded in a known and consistent order), but no matter there are other ways to control that...

    Without knowing the store configuration or other plugins loaded, I would create an auto loading observer based off the following notifier:
    Code:
            $zco_notifier->notify('NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE', $next_option, $products_options_array, $products_options_display_price, $data_properties);
    Adjusting `$products_options_display_proce` to an empty string like the direction of the above link. So that the observer class method would be like:
    Code:
     public function notify_attributes_module_original_price(&$callClass, $notif, $next_option, &$products_options_array, &$products_options_display_price, &$data_properties)
     {
        // Do not display a price per attribute for the attribute
        // https://www.zen-cart.com/showthread.php/230910-Hide-Product-Attribute-Option-Price-(-XX-XX)?p=1409455#post1409455
        $products_options_display_price = '';
     }
    Still have to build the remainder of the observer class and the above won't work directly for older carts or those having refused to upgrade portions of their base code, but incorporating that and perhaps other observers should allow you to sufficiently manage display of product pricing detail based either on the specific product or just across the board and anywhere in between.

    I note that some attribute types have additional price options not controlled right there, like pricing by content being typed (price per character or price per word type pricing)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Apr 2011
    Posts
    582
    Plugin Contributions
    0

    Default Re: Hide Product Attribute Option Price (+XX.XX)

    Quote Originally Posted by mc12345678 View Post
    That edit certainly works for the majority of the pricing display and it becomes obvious when performing an upgrade that there is a change or difference. Provided you keep the edit just where was suggested, yes many years ago, then plugins can still jump in as necessary or desired as long as you keep making that edit to the most recent version of that file.

    An alternative may be to use an observer to adjust that price or other information. I'm not sure if load sequencing has been resolved (ensuring all observers in the same load sequence number are loaded in a known and consistent order), but no matter there are other ways to control that...

    Without knowing the store configuration or other plugins loaded, I would create an auto loading observer based off the following notifier:
    Code:
            $zco_notifier->notify('NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE', $next_option, $products_options_array, $products_options_display_price, $data_properties);
    Adjusting `$products_options_display_proce` to an empty string like the direction of the above link. So that the observer class method would be like:
    Code:
     public function notify_attributes_module_original_price(&$callClass, $notif, $next_option, &$products_options_array, &$products_options_display_price, &$data_properties)
     {
        // Do not display a price per attribute for the attribute
        // https://www.zen-cart.com/showthread.php/230910-Hide-Product-Attribute-Option-Price-(-XX-XX)?p=1409455#post1409455
        $products_options_display_price = '';
     }
    Still have to build the remainder of the observer class and the above won't work directly for older carts or those having refused to upgrade portions of their base code, but incorporating that and perhaps other observers should allow you to sufficiently manage display of product pricing detail based either on the specific product or just across the board and anywhere in between.

    I note that some attribute types have additional price options not controlled right there, like pricing by content being typed (price per character or price per word type pricing)
    While I understand your point and the use of an observer for it, it is way beyond my knowledge or capacity. Thank you though for the explanation

 

 

Similar Threads

  1. v155 Attribute Option Pricing Shows Next to Option - But Product Is Free
    By CraftCorner in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 28 May 2019, 06:06 PM
  2. v151 Hide price in dropdown list when pricing by attribute eg: (+£7.50)
    By mickyholmes in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 14 Oct 2012, 01:48 PM
  3. "Attribute Option and Option Value Do NOT Match" when trying to use price factor
    By helkyrie in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 23 Nov 2009, 04:41 PM
  4. Hide default price for Price by Attribute products
    By DivineIguana in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Sep 2008, 05:39 AM
  5. Change price by attribute set to lowest option
    By joerubes in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 Feb 2008, 04:42 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