[Skip to main content](#vessel-content)

#   Product Base price more a fee in function of restrictions width and length

##

- **[Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")**
- [![Jabatec's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5180.png)](/forum/user/5180-jabatec "View Jabatec's Profile") Topic Author
- [ Offline](/forum/user/5180-jabatec)

Less More

- Posts: 90
- Thank you received: 15
-
- [](https://jabatec.com)
-

7 years 9 months ago [\#302653](#302653) by [Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")  *[Product Base price more a fee in function of restrictions width and length](/forum/26-product-category-display/896682-product-base-price-more-a-fee-in-function-of-restrictions-width-and-length#302653 "Hi, What would be the best way to show the product price based on the values entered in two fields, width and length.  One option I think it would work to create two custom fields, width and length, and work with product variations (characteristics), but I do not know the possibility of limiting the values entered in the custom fields (0-2), (3-5), etc showing an alert message.  Another option is to work with the plugin &quot;HikaShop Custom Quantity plugin width length&quot; but my problem is that the price of the product does not vary depending on m2, cm2, etc., the base price is added an amount based on measures maximum and minimum  Attached an image that simplifies the process.  Thank you very much Javier")* was created by *[Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")*

Hi,
What would be the best way to show the product price based on the values entered in two fields, width and length.

One option I think it would work to create two custom fields, width and length, and work with product variations (characteristics), but I do not know the possibility of limiting the values entered in the custom fields (0-2), (3-5), etc showing an alert message.

Another option is to work with the plugin "HikaShop Custom Quantity plugin width length" but my problem is that the price of the product does not vary depending on m2, cm2, etc., the base price is added an amount based on measures maximum and minimum

Attached an image that simplifies the process.

Thank you very much
Javier

---

Javier Ballester

- [ ![product-base-width-length.jpg](/forum/attachment/45820) ](/forum/attachment/45820 "...dth-length.jpg") [ ](/forum/attachment/45820?download=1 "...dth-length.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTY2ODItcHJvZHVjdC1iYXNlLXByaWNlLW1vcmUtYS1mZWUtaW4tZnVuY3Rpb24tb2YtcmVzdHJpY3Rpb25zLXdpZHRoLWFuZC1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14290
-
-

7 years 9 months ago [\#302661](#302661) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product Base price more a fee in function of restrictions width and length](/forum/26-product-category-display/896682-product-base-price-more-a-fee-in-function-of-restrictions-width-and-length#302661 "Hi, What would be the best way to show the product price based on the values entered in two fields, width and length.  One option I think it would work to create two custom fields, width and length, and work with product variations (characteristics), but I do not know the possibility of limiting the values entered in the custom fields (0-2), (3-5), etc showing an alert message.  Another option is to work with the plugin &quot;HikaShop Custom Quantity plugin width length&quot; but my problem is that the price of the product does not vary depending on m2, cm2, etc., the base price is added an amount based on measures maximum and minimum  Attached an image that simplifies the process.  Thank you very much Javier")*

Hi,

How about creating two options, one for the width and one for the length ?
You would have 99 variants for each option and in each variant, the price you want to add to the base price when that variant is selected.
Then, you could just add the two options to the product.
The only drawback is that the two dropdowns would contain a lot of values, but I don't think that it's too much of a problem. and at least it will behave exactly like you want.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTY2ODItcHJvZHVjdC1iYXNlLXByaWNlLW1vcmUtYS1mZWUtaW4tZnVuY3Rpb24tb2YtcmVzdHJpY3Rpb25zLXdpZHRoLWFuZC1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")**
- [![Jabatec's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5180.png)](/forum/user/5180-jabatec "View Jabatec's Profile") Topic Author
- [ Offline](/forum/user/5180-jabatec)

Less More

- Posts: 90
- Thank you received: 15
-
- [](https://jabatec.com)
-

7 years 9 months ago [\#302705](#302705) by [Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")  Replied by *[Jabatec](/forum/user/5180-jabatec "View Jabatec's Profile")* on topic *[Product Base price more a fee in function of restrictions width and length](/forum/26-product-category-display/896682-product-base-price-more-a-fee-in-function-of-restrictions-width-and-length#302705 "Hi, What would be the best way to show the product price based on the values entered in two fields, width and length.  One option I think it would work to create two custom fields, width and length, and work with product variations (characteristics), but I do not know the possibility of limiting the values entered in the custom fields (0-2), (3-5), etc showing an alert message.  Another option is to work with the plugin &quot;HikaShop Custom Quantity plugin width length&quot; but my problem is that the price of the product does not vary depending on m2, cm2, etc., the base price is added an amount based on measures maximum and minimum  Attached an image that simplifies the process.  Thank you very much Javier")*

Hi, Nicolas thank you

Going for product variations would lead to very long dropdowns, without including the introduction of millimeters.

A new way that we are analyzing is to make use of two groups of checkouts that allow adding an amount to the base price of the product. In parallel, ask the user to enter the exact values, width and length.

In this situation, we have 2 doubts

a) With hikashop, we could get to have the two groups of checkouts to increase the base price. Would the best option be to use Custom Field Plugin?
b) It is possible to work the Regular Expression Check option in the custom fields check group to warn / restrict the user that the entered values do not correspond to the selected mode.

Attached descriptive image of the process

[ ![product-base-width-length-r2.jpg](/forum/attachment/45831) ](/forum/attachment/45831 "...-length-r2.jpg")

Thank you very much
Javier

---

Javier Ballester

- [ ![product-base-width-length-r2.jpg](/forum/attachment/45831) ](/forum/attachment/45831 "...-length-r2.jpg") [ ](/forum/attachment/45831?download=1 "...-length-r2.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTY2ODItcHJvZHVjdC1iYXNlLXByaWNlLW1vcmUtYS1mZWUtaW4tZnVuY3Rpb24tb2YtcmVzdHJpY3Rpb25zLXdpZHRoLWFuZC1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14290
-
-

7 years 9 months ago [\#302708](#302708) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product Base price more a fee in function of restrictions width and length](/forum/26-product-category-display/896682-product-base-price-more-a-fee-in-function-of-restrictions-width-and-length#302708 "Hi, What would be the best way to show the product price based on the values entered in two fields, width and length.  One option I think it would work to create two custom fields, width and length, and work with product variations (characteristics), but I do not know the possibility of limiting the values entered in the custom fields (0-2), (3-5), etc showing an alert message.  Another option is to work with the plugin &quot;HikaShop Custom Quantity plugin width length&quot; but my problem is that the price of the product does not vary depending on m2, cm2, etc., the base price is added an amount based on measures maximum and minimum  Attached an image that simplifies the process.  Thank you very much Javier")*

Hi,

My previous proposal would indeed lead to long dropdowns.

In that case, I would recommend to still go with 2 options but only with the three selections like you did in your image and then add two custom fields to enter the precise value.
You won't be able to use the regex check however.
You'll have to add custom javascript to check the value entered in the input based on the selection of the options.
It not that complex, just a few lines of javascript.
[ stackoverflow.com/questions/24865177/add...nt-listener-to-field](https://stackoverflow.com/questions/24865177/add-an-onchange-event-listener-to-field)
[ stackoverflow.com/questions/15839169/how...elected-radio-button](https://stackoverflow.com/questions/15839169/how-to-get-value-of-selected-radio-button)
And you could add that in one of the view files of the product page as a view override.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTY2ODItcHJvZHVjdC1iYXNlLXByaWNlLW1vcmUtYS1mZWUtaW4tZnVuY3Rpb24tb2YtcmVzdHJpY3Rpb25zLXdpZHRoLWFuZC1sZW5ndGg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.068 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
