If on the site is used COD payment, anyone can go through checkout and get product key for free.

Comments

freixas’s picture

Assigned: Dimanic » freixas

Hi,

COD payment for a product delivered online does not make sense. I think you will need to disable COD payments or add some custom code to ensure that COD is not valid if a product key is placed on the order.

I don't think it makes sense for the uc_product_keys module try to work around each possible payment systems.

However, I'm open to suggestions. How would you like the module to work?

Dimanic’s picture

Thanks for answer )))
Ok, I got it. It doesn't make any sense, but how prevent showing product code if there are on my shop shippable and some none shippable products, and the shop is also used COD payment?
Another question. On my site I don't generate any codes, it means customer can buy key, but won't get it because they all are sold. Are there any possibilities to see on the admin panel that king of users?

freixas’s picture

Status: Active » Closed (won't fix)

I wish I could help you, but this is one you will need to figure out on your own. You will need to decide what your shop should do when a user mixes the two types of products and then you will need to figure out how to implement that behavior.

I would suggest you examine if you can disable the COD option if the cart contains downloadable products.

As for your second question, we may have a language barrier preventing me from fully understanding it. I am guessing that when you say you don't generate any codes, you mean that you don't generate product keys dynamically. If you import the product keys, then it is possible that you will run out. The uc_product_keys module will work together with the uc_stock module to keep track of the available keys and prevent selling keys when the stock is depleted.

The catch is that this work only when you have a single product associated with a single product sequence. There might be a way to improve this so that the stock of each product associated with a product sequence is kept equal to the number of licenses available. A patch would be welcome.

If you don't use the stock module, what happens if you run out of product keys? This is a good question and something that I probably haven't handled as well as I should. In addition to an irate customer, you will also get a message in the watchdog log identifying the order for which a problem occurred.

Suggestions for improvement would be welcome. The keys aren't assigned until checkout is complete. This normally means that payment has been received (except in cases like COD). So the customer has paid for his keys, but we may have run out of keys right before he submitted his order—exactly what the code should do is not obvious. Again, I'm open to suggestions, but you should really start a new issue for that problem. This issue is about COD payments and I've marked it "won't fix".

freixas’s picture

Status: Closed (won't fix) » Needs review

See #733776: Product Key visible in my account when order status is pending. The changes I made for that bug may have fixed your COD problem. Could you test out the dev release dated 3/5/10 or later and see if your problem is fixed (and no new ones cropped up)?

freixas’s picture

Status: Needs review » Closed (won't fix)

No response for more than 2 weeks.