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

#   Calculate price based on size (Square Inches)

##

- **[piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")**
- [![piperpilot's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/401-piperpilot "View piperpilot's Profile") Topic Author
- [ Offline](/forum/user/401-piperpilot)

Less More

- Posts: 2
- Thank you received: 0
-
-

15 years 11 months ago [\#2617](#2617) by [piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")  *[Calculate price based on size (Square Inches)](/forum/4-how-to/2617-calculate-price-based-on-size-square-inches#2617 "Hi,  Is it possible with HikaShop to calculate a price based on an item size? I am building a shop for PCB manufacturing. I have a custom Joomla component that allows someone to upload their design. I run some processing against it and eventually come out with a Square Inches size. I need to be able to pass that size to HikaShop and have the price calculated when it is added to the cart.  Possible?  Thanks, Curtis")* was created by *[piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")*

Hi,

Is it possible with HikaShop to calculate a price based on an item size? I am building a shop for PCB manufacturing. I have a custom Joomla component that allows someone to upload their design. I run some processing against it and eventually come out with a Square Inches size. I need to be able to pass that size to HikaShop and have the price calculated when it is added to the cart.

Possible?

Thanks,
Curtis

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI2MTctY2FsY3VsYXRlLXByaWNlLWJhc2VkLW9uLXNpemUtc3F1YXJlLWluY2hlcz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 11 months ago [\#2619](#2619) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Calculate price based on size (Square Inches)](/forum/4-how-to/2617-calculate-price-based-on-size-square-inches#2619 "Hi,  Is it possible with HikaShop to calculate a price based on an item size? I am building a shop for PCB manufacturing. I have a custom Joomla component that allows someone to upload their design. I run some processing against it and eventually come out with a Square Inches size. I need to be able to pass that size to HikaShop and have the price calculated when it is added to the cart.  Possible?  Thanks, Curtis")*

Hi,

What could be possible is to have several products (or one product with several variants) each one with a different price and then based on the size adding one product or the other to the cart.
You can easily add a product to the cart like that: Code:

include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php'); $cart = hikashop::get('class.cart'); $cart-&gt;update($product_id,$quantity,0);

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

- **[piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")**
- [![piperpilot's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/401-piperpilot "View piperpilot's Profile") Topic Author
- [ Offline](/forum/user/401-piperpilot)

Less More

- Posts: 2
- Thank you received: 0
-
-

15 years 11 months ago [\#2623](#2623) by [piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")  Replied by *[piperpilot](/forum/user/401-piperpilot "View piperpilot's Profile")* on topic *[Re: Calculate price based on size (Square Inches)](/forum/4-how-to/2617-calculate-price-based-on-size-square-inches#2623 "Hi,  Is it possible with HikaShop to calculate a price based on an item size? I am building a shop for PCB manufacturing. I have a custom Joomla component that allows someone to upload their design. I run some processing against it and eventually come out with a Square Inches size. I need to be able to pass that size to HikaShop and have the price calculated when it is added to the cart.  Possible?  Thanks, Curtis")*

Thank you for the response. This won't work for me because the quantity is actually calculated from a dynamic size. a design might be 1.24 x 3.11 = 3.86 square inches while another might be 1 x 2 = 2 square inches. Those would have different costs associated with them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI2MTctY2FsY3VsYXRlLXByaWNlLWJhc2VkLW9uLXNpemUtc3F1YXJlLWluY2hlcz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 11 months ago [\#2625](#2625) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Calculate price based on size (Square Inches)](/forum/4-how-to/2617-calculate-price-based-on-size-square-inches#2625 "Hi,  Is it possible with HikaShop to calculate a price based on an item size? I am building a shop for PCB manufacturing. I have a custom Joomla component that allows someone to upload their design. I run some processing against it and eventually come out with a Square Inches size. I need to be able to pass that size to HikaShop and have the price calculated when it is added to the cart.  Possible?  Thanks, Curtis")*

You can always create a new value of the characteristic, then a new variant of the product and then add a price for that variant and add that variant to the cart, all that doing few SQL queries. But you can't just add a price to a product in the cart as the system needs the price to be linked to the product in the database.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI2MTctY2FsY3VsYXRlLXByaWNlLWJhc2VkLW9uLXNpemUtc3F1YXJlLWluY2hlcz90bXBsPW1hcmtkb3du) 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.059 seconds

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

[](#top)
