-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.25
-- Browser(s) name and version -- : Firefox Dev edition
-- Error-message(debug-mod must be tuned on) -- : n.a
HI Hikacrew !!
OK my problem is quite unique as this company manufactures their own clothing, from beginning to end.
So they make the materials (latex sheeting) then cut it up and make clothing out of it.
Now, they do have quite a few clothing items in stock (over a hundred), but it's just impossible to have everything item of clothing they can make in stock (too many styles and colors), so if they don't have it, they will make it - although it can take 4~6 weeks.
So Boxing day is coming and they want to make a coupons that will give a certain percentage off all "In stock" items ONLY.
Now I have read this
post
, and so that has show me how to fix the view in .../product/quantity.php. So that's all good.
(see attachments)
So I have set the "out of stock" value to 1000 (anything over 1000 means "in stock", as specified in that post).
So I guess I have alter the coupon code and throw in basic conditional statement/ or create a function that I could then add to the coupon function. Soething roughly a long these lines:
If quantity > 1000
then apply coupon
else
don't apply coupon ! (break;)
(sorry haven't looked up the variables yet)
Now my only problem is :
Where would i add such a statement? OR in which file does the code reside?
I know the best way would be to add a new field/params to the coupon/discount section of Hikashop...
But as I'm running out of time quick, I thought a core hack would do for now.
Any help or hint will do.
Thx in advance.
V.