cubecart / v6

CubeCart Version 6
https://cubecart.com
73 stars 57 forks source link

Feature Request: unbuyable products #111

Closed hairy-dog closed 9 years ago

hairy-dog commented 9 years ago

It would be useful to have a way to set a product that is displayed like any other product, but can't be bought.

At present the only way I can see of doing that is by making it out of stock, but that only works if you prevent OOS stock being bought.

bhsmither commented 9 years ago

I am curious: what would be a "product" that could not be bought?

There are a few conversations on the forums about changing the phrase "This item is currently out of stock." to something less specific, or not having anything at all. Thus, no way to buy the product, but no indication as to why.

abrookbanks commented 9 years ago

Very true. It seems like a rather unique requirement.

bhsmither commented 9 years ago

$CTRL_ALLOW_PURCHASE could be set to false from a test using an available hook.

In the skin, there isn't a means of showing why, if that's desired. $COMMENTS could be used to hold a data-list(?) for something in the <div class="options"> block.

hairy-dog commented 9 years ago

I can think of quite a few stores that sell things "off the peg" but also sell bespoke or customised items. The one I have in mind wants to be able to give an idea of price, but not take an order until the customer has contacted them about it. However, it is very widely applicable. Most of what I do comes into that category!

Is there somewhere that I can find out about available hooks? I've yet to find any documentation for CubeCart - I've had to work out how it works from reading the code.

hairy-dog commented 9 years ago

Oops!

bhsmither commented 9 years ago

https://support.cubecart.com/index.php?/Knowledgebase/List/Index/46/developer-articles But, yes, it's coming to understand CubeCart by reverse engineering the code.

"be able to give an idea of price, but not take an order until" OOS would certainly do that, but "Allow out of stock purchases" is a store-wide setting - which you said you do not want to disable.

What "setting" or "characteristic" would you want to name that aspect of a product such that it can be seen, but "individually" and "uniquely" not able to purchase?

hairy-dog commented 9 years ago

Ideally, you could mark a product (or a product option) "Display only" so that it is visible with a price, but can't be bought.

As it stands, a product can be "on" or "off" depending on its status setting. If in a non-visible category It can be invisible but still buyable. It is only buyable if in stock or if buying OOS items is enabled.

What is needed is to build on that logic so that a product can be visible or not visible, buyable or not buyable if in stock, and also if OOS. So the obvious (but maybe not the best or easiest to implement) is to have two options each with three statuses for a product

Visible whether or not in stock / Visible if in stock / Invisible Buyable whether or not in stock / Buyable if in stock / Not buyable

I'd make the middle option the default in both cases

How would an unbuyable product work? Perhaps the user can put it into a basket, but not buy it. Perhaps instead of "add to Basket" it says "add to wishlist" or "enquire about this product". I don't really mind how it works, but I'd like to see the basic functionality available. I can see quite a few applications for it.

havenswift-hosting commented 9 years ago

As Al said previously this is quite an unusual (unique) requirement and probably better suited to a custom plugin rather than having changes in the core product so maybe look for a developer to custom develop something for you

abrookbanks commented 9 years ago

I'm on the fence TBH.

hairy-dog commented 9 years ago

I can think of half a different current clients with ecommerce websites that would use this /today/.

The ability to control OOS purchase by product is very important, and almost universally useful in my experience.

Few stores have ALL products on the same availability: they will have some items they can sell when OOS and others that would take too long to restock. So a site-wide setting is not what they want.

Usually they fudge this by setting the items that can be sourced more easily with a stock level of 1010 (assuming they have 10 in stock) and a low stock alert at 1005 but this isn't ideal.

abrookbanks commented 9 years ago

I agree. Implementing it now. Very simple and very powerful.

abrookbanks commented 9 years ago

Screenshots below

screen shot 2015-01-29 at 13 20 58 screen shot 2015-01-29 at 13 20 51 screen shot 2015-01-29 at 13 20 45 screen shot 2015-01-29 at 13 20 38

abrookbanks commented 9 years ago

Admin Screenshot

screen shot 2015-01-29 at 13 22 54

abrookbanks commented 9 years ago

I've closed this. Please reply back if I missed anything and I can reopen.

hairy-dog commented 9 years ago

I'm not sure about the labels. I assume that the "Status" checkbox means "Visible" . If so, Visible would be a better label.

The "Available for purchase" checkbox presumably means people can buy it. But does that mean always? Or just when there is stock?

This could be a three-state checkbox: selected meaning always, blank meaning never and the "filled in" undefined state meaning "when there is stock".

In face both checkboxes could have the same three states. Or they could be sets of three radio buttons - if easy to code, that would be clearer to shop owners.

abrookbanks commented 9 years ago

I'm not sure about the labels. I assume that the "Status" checkbox means "Visible" . If so, Visible would be a better label.

Maybe "Enabled" is better than status.

The "Available for purchase" checkbox presumably means people can buy it. But does that mean always? Or just when there is stock?

Other conditions come first. It will show out of stock if thats the case as a priority if those such restraints are in place.

This could be a three-state checkbox: selected meaning always, blank meaning never and the "filled in" undefined state meaning "when there is stock".

Thats getting too complex and may introduce bugs which I don't want to do at this stage of the game. I can add documentation.

In face both checkboxes could have the same three states. Or they could be sets of three radio buttons - if easy to code, that would be clearer to shop owners.

hairy-dog commented 9 years ago

I think the label should be clear and explanatory. Neither "Enabled" nor "Status" actually tell you anything specific. Does it mean the product can be seen or that it can be purchased, or both? Whatever the checkbox does should be described by the label.

I think you are saying that "Available for Purchase" being selected means it will show "out of stock" (or be available for purchase if OOS purchases are enabled globally), but I'm not sure how that addresses the issue of per-product OOS purchases.

If not selected, the product can't be purchased. Clearly if it can't be purchased, the stock levels won't change unless the admin changes them.

hairy-dog commented 9 years ago

I think that what emerged in beta 4 looks fine.

abrookbanks commented 9 years ago

Excellent!!