Jump to content

Hide Categories


nairB

Recommended Posts

I upgraded from Ver 3 to Ver 5. I was able to hide some categories from displaying by updating some SQL code in version 3. I'm not having much luck finding how to hide categories in Ver 5. I see I can check a box to make them no longer "Visible", but this doesn't let me use those products any longer (my client does not want them to display in the cart, but to be accessable from their website only).

Any ideas of how I can accomplish this in version 5? Thanks for any help!

Link to comment
Share on other sites

From a comment made concerning an interesting mod product:

"Yes, it is possible to have an item that cannot be easily [found in the store]. [it is] a quirk of CubeCart. When you add such an item that is going to be [hidden], do not add it to any categories. You will get a warning about that when you save the product details, but ignore that. This item will then not be shown in any category on the site and will not come up in any search results."

From that comment, I will assume the approach is to work at this on a product-by-product basis. I haven't tried this, and the comment was made 14 months ago when CC500Gold was released. So I don't know if this will still work.

Link to comment
Share on other sites

bsmither, thanks for the reply. I gave it a try but not having luck linking to it. I created the product, as stated, displaying the error, but no luck linkning to it. There must be a way to link to this, but I've not figured it out just yet!

Link to comment
Share on other sites

I tried it on 5.1.4, and it worked for me. Create your product listing, but do not put it in a category. Ignore the message. Be sure the product is enabled with a green check on status. Search as a customer for the product code (01test for mine). It shows up in search. So if you want to link to the product you will need to link to it as a search result.

http://dirtybutter.com/plushcatalog/index.php?_a=category&search[keywords]=01test

Link to comment
Share on other sites

I'm not sure why the search isn't working for me. I created the product, without a category, and saved, ignoring the warning. I made sure the status us checked/green. When I go to search it doesn't come up. I see it is working with your example, and I'm not seeing why it isn't for me.

The product_id=58 and the product code is "01test". I've changed product codes, trying different ones to see if that was it. I've checked and unchecked status. Nothing seems to allow me to search on it. I've tried direct hardcoding with the product_id and it doesn't show up. Just not sure what I'm missing????

You can view the cart here, if that helps: http://exportcompliancesolutions.com/cart/

bsmither - If I replace the product_id with the product_id of my "hidden" product it displays a blank item. Putting in any invalid product_id does the same thing - a blank product.

Link to comment
Share on other sites

Bsimither's link is much better than mine!


http://www.store.com/index.php?_a=product&product_id=1

I didn't actually create a new test product, as I already had this one for my purposes. So I cleared all check marks on the Categories to simulate your situation. BUT the primary dot was still marked, although the checkbox next to it was blank when I saved it. I didn't think to check back to be sure it stayed that way - it didn't - CC re-marked it as having a category all on its own. So my test wasn't really a test after all. I'll try again.

NO- It does NOT work.

Link to comment
Share on other sites

I'm sure I just used it incorrectly, but Bsmither's link within orders.index.php didn't work for me. I've had this code added to the Order Summary page in Admin for some time, so I can easily link to the actual listing on the store:


<a href="{$STORE_URL}/index.php?search[keywords]={$product.product_code}&_a=category" target="_blank">{$product.product_code}</a>-





So I played around with using Bsmither's code as a replacement:



<a href="{STORE_URL"}/index.php?_a=product&product_id={$product_id}"></a>

Surely I just interpreted how to use it wrong.

Link to comment
Share on other sites

Okay, so it didn't work for you either. So, I'm not losing it at least. But now I'm lost with your last post, unless I'm reading it correctly, you're just changing a link you were using to a simpler link... which isn't anything for me, I think?

Link to comment
Share on other sites

But now I'm lost with your last post, unless I'm reading it correctly, you're just changing a link you were using to a simpler link... which isn't anything for me, I think?

Actually it does apply to you. Without actually putting the item number in Bsmither's code, I couldn't get it to work to provide a link to (in your case) the hidden item.

What I tried to do was to use his code to provide a link to the listing from within the orders.index.php, instead of my old way of doing it - I couldn't figure out how to make his code work. But I'm wet behind the ears when it comes to coding PHP. I feel sure he'll provide what I should have done to make it work, and that will give you the way to link to your hidden item.

I might have a solution to getting the hidden item to be searchable. Create a new Category named Hidden, enable it, but do NOT mark it as visible. Then you can put your hidden item in that category and maybe, just maybe it will be searchable. It's worth a try.

Link to comment
Share on other sites

I tried using the not visible Hidden category and it worked!!!

Now to just get a better link to it that you can use in your code. My old way does work, but it doesn't take you directly to the listing. It takes you to the search results page for the hidden item, and then the customer would have to click on that.

How are you going to use these hidden products? Just put a link to the client's website link to it in the description?

Link to comment
Share on other sites

Hmm, it only kind of works for me. It allows me to search on it, and it brings up the results, but I can't actually view the product page itself or even add it to the basket. Am I mssing something?

If I can get it to work, yes I will be adding a link directly to it on the clients website since they don't want just everyone seeing it directly.

Link to comment
Share on other sites

Sorry, I'm getting the same empty results that you did, and Adding to Cart from the search link doesn't work, either. So you are going to have to come up with a coding way to do this. And what I was trying to do to use Bsmither's link code won't apply to your situation after all, from the looks of it.

Link to comment
Share on other sites

Ah, okay. At least I'm getting what you're getting! I coded it in CC3, but not having any luck in CC5. My PHP skills aren't quite there yet. I'll dig around some more and maybe stumble upon it! :dizzy: Thanks for all of your help in trying to get me there. I really do appreciate it!

Link to comment
Share on other sites

I just wish I knew enough to help, but at least we now know what does NOT work. Good luck! I look forward to seeing how this is finally resolved. If you haven't already, you might want to ask for help with this on the 3rd party forum.

Do you want the link on your client's site to go straight to the Add to Cart button? I'm still not completely clear on that part, and explaining it to me might save a little time when someone capable of helping comes along.

Link to comment
Share on other sites

The link would need to go to the product page. The user watches a video, then at the end of the video they have the option to click on a link to buy the product, by going directly to that product page(not adding it to their cart). The client does not want just anyone viewing/buying the product, they would like them to read or watch something about it first.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...