Remove Add to Cart Button on a per Category basis

  • Posts: 37
  • Thank you received: 0
10 years 11 months ago #157787

-- HikaShop version -- : 2.3.1 Business
-- Joomla version -- : 3.3.0
-- PHP version -- : 5.4.28

Currently I have a photo category that I want users to be able to buy and download. I also have a print category that I would like to emulate catalog mode, with no add to cart button. Until I figure out the whole upload files for customers, front and back, and get it working I would like the option to emulate catalog mode on certain products or categories of products.

I see I can turn it off on menus but that doesn't seem to remove it once they click on the product.

This option may be present, but I am not yet proficient with Hikashop and where to find everything. I have used catalog mode in the past but now I would like to start shifting to allow purchase of digital download of photos, but not yet allow them to add print products to the cart.

If there isn't a quick easy solution, then I will just move print products to regular articles for now with basic information.

Last edit: 10 years 11 months ago by blbeta.

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 11 months ago #157804

As you figured, the catalogue mode is an "all or nothing" thing. And yes, hiding the add to cart button works in individual menus and modules, but only for listings.

More depends on only few factors. As far as I can see:
If your site has lots of categories and products and is very dynamic (frequent additions and deletions of products), adding some PHP code to the product page view would make sense.
If you have only few categories, not crazy many products, you enter those yourself through the backend, and you're not bound to using a very specific product "Code", then a simple but targeted CSS line will hide the add to cart button for the products you want.

So, it would require the the first part of the product "Code" - which you have control of through the backend - to be unique and identical for all the products that shall not have an add to cart button on their product pages.

An example:
Let's take the word "print", assuming that it is not part of any product code, yet. In the backend, for all present and future product in the print category, you add "print_" (without quotes) in front of the product code. If you have no product code manually entered yet, then this is the point of time when you will do so. So, in the field "Code" of print product "XYZ 123" you make the code "print_xyz123" or whatever, but always that "print_" in front.

Would that approach be doable for you? Then the rest is kiddy stuff ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 0
10 years 11 months ago #157939

it really is only a few things for me currently. It was a long night last night and my brain was fried. Thanks for the solutions. Being that it really won't be a lot of stuff I am using quick CSS for it.

Right now I have this and it seems to work. I will just add more products to the rule as needed for now. It is only going to be twelve or so.

#hikashop_product_Business_Cards_3_10_1_page .btn {
  display: none;
}

Do you see any reason I shouldn't do it like this?

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 11 months ago #157944

No, can't see any reason why not to do it this way. Again, if you only have few products and no or not much fluctuation, then this is a practical way with the benefit of exactly targeting the product you want.

Other solutions are possible should conditions change.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 0
10 years 11 months ago #157945

I plan on it only being temporary solution until I become more comfortable with Hikashop and e-commerce in general. Need this site live before this Sunday. I eventually will use the capability for users to upload their artwork for the prints, but I don't have time to make that function just yet.

Thanks again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum