-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 7.0.6
-- Browser(s) name and version -- : Firefox 46.0.1
Hi,
A little intoduction:
A client is selling pvc floors. The price for a product is a price per m2. However a package contains for instance 3.62 m2 and he only sells full packages.
I made a custom field for priceperm2, a custom field for packegecontents and a custom field so a client can fill in the surface for which he needs a floor.
On the product page there is a input field where a customer can enter the surface of m2 he needs (for instance 12 m2) and than the amount of packages (3.62 m2 per package) is calculated, so in the cart there will be 4 packages (= 14.48 m2)
This is working fine but now he wants to advertise with the slogan "Every 5th m is for free". So, in the example above (when surface = 12, price per m2 = 42.95 and package price = 155.48 there should be a (calculated) discount of: ((floor)surface/5 * priceperm2))
My question:
How can I implement this so that in the cart there is a (per product) calculated discount that is substracted from the total price as in the attached (photoshopped image)?
Kind regards,
Eric Beernink