Having an issue with cart scripts stacking with function discounts. If I use a generic shopify discount code it stacks with the cart script meaning some items have 2x discounts which is expected, however if I then create a discount code via a function discount, it no longer stacks with the script discount and all items have 1 discount from the function, is this a bug?
I know that the script + function discount is applied because I’ve been in the same situation as you. Have you made the combination selection? Maybe the issue is related to that. I want to help you, but I need more details. Can you provide more information?
Yeah have tried changing the combination settings and nothing changed unfortunately. Even with a native shopify discount and the combinations disabled it still stacked with the script discount (as I believe combinations are just for multiple shopify discounts rather than discounts + scripts). I tried the function discount with all combinations enabled and disabled and the outcome was the same, only the function discount was being applied
I’m running both function discount and script discount together. There might be another issue. It requires checking the codes. I don’t have any issues; it works in both scenarios.
Since I can’t see the exact line that is causing the error, I can’t specify its exact location. However, if you perform a nil check before the line that is causing the error, the issue should be resolved.
It doesn’t give me any errors either. Shopify scripts are behaving a bit oddly, but I am sure that 1 script 1 function is working because I have tested the same combination, and both are working simultaneously. To understand the problem you are experiencing, a detailed examination is necessary. It seems like you opened a single-line code to test. If you delete the current script and create a new empty script, the issue should be resolved. I would be happy to assist. I am looking forward to your responses.