سؤال

Currently working on a website were some products require user input for example Width and Height

From this the m2 price (for example 14) is done between the width and height given by the user and then the quantity is added.

What would be the best way to do this?

هل كانت مفيدة؟

المحلول 2

Found a way to do it with the aid of a freelancer, will edit this post once I have more details.

نصائح أخرى

I've dealt with this problem before on this shop (link for reference) where you order tiles by the box but it allows you to fill out m2 to calculate how many you need.

I suggest adding the product in the backend with the price of 1 square meter, so when someone orders 4m2 he just orders 4 items. Then in the frontend modify the html of the quantity box to have 2 inputs for width and height and translate that with some simple javascript to the hidden qty box.

It's an easy fix but works great. Alternatively, if you need to have the width and height mentioned with the item in the order make custom options for the product with that name and use those inputs to calculate quantity.

This way you're staying close to the normal Magento functionality meaning you cal still apply special prices or even tierprices when people order large amounts of square meters.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top