Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hide price in one category

    Quote Originally Posted by Congerman View Post
    Now one other problem. The price still shows on the listing page for that category. Cannot seem to find the listings page template and what code do I need for the listings template?
    This is why the product-type approach is better.
    .

    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.

  2. #12
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Hide price in one category

    Thanks dr Byte

    How do I get your code to display no price rather than £0.00

    $product_check = $db->Execute("select master_categories_id, products_tax_class_id, products_price, products_priced_by_attribute, product_is_free, product_is_call, products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'" . " limit 1");

    if ($product_check->fields['master_categories_id'] == 10) { // change '10' here to the category number
    return '';
    }

  3. #13
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Hide price in one category

    Quote Originally Posted by Congerman View Post
    Thanks dr Byte

    How do I get your code to display no price rather than £0.00

    $product_check = $db->Execute("select master_categories_id, products_tax_class_id, products_price, products_priced_by_attribute, product_is_free, product_is_call, products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'" . " limit 1");

    if ($product_check->fields['master_categories_id'] == 10) { // change '10' here to the category number
    return '';
    }
    When I tested it it displayed no price at all. But I only use USD on my sites. Perhaps you've got something reformatting the price again and that is treating the "blank response" as "0" and then reformatting that to £0.00 ?
    .

    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.

  4. #14
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Hide price in one category

    Thanks for comming back. GBP is the only currency in my admin, and surely currency only changes the symbel and exchange rate can you look at artofrecycling.co.uk/shop and then the sold category. Could really do with hiding the £0.00

    Could you advise a code, maybe css to display no price field if that category?

    thanks for the help so far Dr Byte

  5. #15
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Hide price in one category

    Quote Originally Posted by DrByte View Post
    When I tested it it displayed no price at all. But I only use USD on my sites. Perhaps you've got something reformatting the price again and that is treating the "blank response" as "0" and then reformatting that to £0.00 ?
    Hi could your code be adapted to show an image instead of price on that category?

  6. #16
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Hide price in one category

    Quote Originally Posted by Congerman View Post
    Hi could your code be adapted to show an image instead of price on that category?
    I think really the issue is can your code be modified to adapt to the data provided by DrByte's suggested modification? Okay, not so much can it be modified, but what is different that is causing this issue? Ie. How is the code on your site different than a vanilla install of ZC? (file/folder comparison software is available either as a free or commercial product.) Already the template code is different as described by the use of short codes, there is likely something else that is different causing the observed issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Hide price in one category

    I find it great that I am getting all the insights about template coding, and I am appreciative. I am not a coder. I am using the BANA template. I would love for someone who knows that template to be able to assist in hiding the price field in category 3 listing page.

    As a fix all I will have to use css to not display prices on all category listings pages, but my client would prefer not to go down that route.

    Thanks to all so far for your imput in trying to resolve this for me

  8. #18
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Hide price in one category

    If they are OK with just the applicable category not showing prices (provided product is not a new, special or featured product) then you could create a css file just for that category. See the readme/info file in includes/templates/template_default/css
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #19
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Hide price in one category

    in all the years I have been using zen cart I have never noticed that file

    So c_??_??.css would apply changes only to one category? Is the first ?? the category number and the second ?? the product number within that category?

    would I just create a css file called c_03.css and then just display none the price field and it will only affect category 3?

    A fantastic find if it is that simple

    I would have to set no products to be marked as new as well I guess

  10. #20
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Hide price in one category

    Quote Originally Posted by Congerman View Post
    in all the years I have been using zen cart I have never noticed that file

    So c_??_??.css would apply changes only to one category? Is the first ?? the category number and the second ?? the product number within that category?

    would I just create a css file called c_03.css and then just display none the price field and it will only affect category 3?

    A fantastic find if it is that simple

    I would have to set no products to be marked as new as well I guess
    Well, there is one thing though, the price won't be seen by the vast majority of customers, but the price data will still be present (view source will still show whatever price and search engines basically ignore css).

    Otherwise, regarding the category css files, they are perhaps/possibly the most finicky because a category can be shown as the base/master category, but it can be a sub-sub-etc category and therefore the cPath could include just the finally category or sub-categories before it. But yes, effectively a single file could be used to visually hide something related to a particular category.

    Solutions such as these tend to get offered when the goal is clearly identified and understood. Again to clearly state, using css to visually hide the price will still cause the product's price to be found in an Internet search only for a customer to arrive at a page indicating that the product was sold. It is not much of a plus to the customer's shopping experience... but then again, the store is being operated to keep the product listed, but under a sold category...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Hide one category from category side box
    By robbie269 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 Feb 2014, 03:35 PM
  2. Hide one category in LH box
    By gprit in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 26 Jul 2010, 01:49 PM
  3. Hide category count -- on only ONE category
    By reneep in forum Setting Up Categories, Products, Attributes
    Replies: 31
    Last Post: 28 Apr 2010, 08:13 PM
  4. Hide Price for only one category
    By microinfo in forum General Questions
    Replies: 2
    Last Post: 26 Jun 2008, 11:13 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