Forum
Trade pricing / Wholesale
Hi Can I add tags and a bit of code somewhere that will automatically discount a customers price? I need 3 or 4 pricing tiers. e.g. 5%, 10%, 15%, 20%
Hi Can I add tags and a bit of code somewhere that will automatically discount a customers price? I need 3 or 4 pricing tiers. e.g. 5%, 10%, 15%, 20%
You could automatically apply promotions to offer that discount.
Could you give me a little pointer? Im not sure where that would go. I know it'll be simple )
Create a promotion for the discount you want.
Use
perch_shop_set_discount_code('ABC123');
to set it when you determine that the customer qualifies.Ok, am I on the right lines here
and will that work just placed below
in my cart.php page ?
It'll need to go before the cart.
I have placed code as above but the cart is no longer loading. I'm not great with PHP. Is there more I should have done?
Yes, let us know what error you're getting.
It's displaying nothing more than my header. So everything from above the code I've placed. Debug has disappeared too.
Here's my cart.php.. it's basic..
What error are you getting in your error log? If PHP is terminating you have an error, what is it?
Hi I've been using the debug but thats not showing now. How do I access the error log? I'm assuming the command line but unsure of the command to use. I'm on a mac and using MAMP.
Wherever MAMP stores the error log, I assume they have some documentation. You need to be able to access the error log to do basic debugging.
I found this
PHP Fatal error: Call to undefined method PerchShop_Cache::set_discount_code()
Here's the complete line from project folder path
[12-Jul-2016 17:22:04 Europe/London] PHP Fatal error: Call to undefined method PerchShop_Cache::set_discount_code() in /perch/addons/apps/perch_shop/lib/PerchShop_Runtime.class.php on line 184
Ah, great. In that case, that's simply a bug and we'll get it fixed.
Keep me posted when you do.
Thanks Drew
We've fixed it internally, so it'll be in the next update.
Brilliant! Thanks again )