Christopher Short Posted December 21, 2021 Share Posted December 21, 2021 Is there a reason why giftcard product code cannot be all numbers? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 21, 2021 Share Posted December 21, 2021 See: https://github.com/cubecart/v6/issues/2502 I haven't gone through the code to explain this to myself, yet. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted December 22, 2021 Author Share Posted December 22, 2021 6 hours ago, bsmither said: See: https://github.com/cubecart/v6/issues/2502 I haven't gone through the code to explain this to myself, yet. Well dang, My POS uses # only for product codes. I'll get Alec to do something to match it in the module he built. Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 22, 2021 Share Posted December 22, 2021 (edited) From my analysis of the code: We can bypass the code in the admin script that checks for this giftcard product_code condition. Then, as long as the giftcard product_code is way out of range than a regular inventory item product_id, for example 999999, you should be safe enough. (Can't really use '0000' even though the inventory table will never have a product_id of 0, CubeCart does use 0 (if I recall correctly) for the admin-entered non-inventory item(s) when editing an order summary.) Edited December 22, 2021 by bsmither Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 22, 2021 Share Posted December 22, 2021 3 hours ago, bsmither said: From my analysis of the code: We can bypass the code in the admin script that checks for this giftcard product_code condition. Then, as long as the giftcard product_code is way out of range than a regular inventory item product_id, for example 999999, you should be safe enough. (Can't really use '0000' even though the inventory table will never have a product_id of 0, CubeCart does use 0 (if I recall correctly) for the admin-entered non-inventory item(s) when editing an order summary.) This is 100% correct. CubeCart will think its a standard product if the product code is numeric. If I wrote CubeCart again I would suggest a dropdown menu for product types with values product, service, gift card etc.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.