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

#   Price = quantity x length x price per meter?

##

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#258387](#258387) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258387 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")* was created by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")*

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m

We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price.
For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters.
In order: 1 Profile of length 2.5 meters of 2.5 €.
price = quantity x length x price per meter
Is that possible?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 9 months ago -  9 years 9 months ago [\#258437](#258437) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258437 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

Yes, it's possible with a custom field of the table "item" and a price override plugin to take into account the value in the custom item field where the customer can enter the length.
In our FAQ, we provide a plugin to handle the same thing but to have the customer enter both the width and the length:
[ www.hikashop.com/support/documentation/106-faq.html#cart](https://www.hikashop.com/support/documentation/106-faq.html#cart)
Adpting the plugin to handle only the length is really easy.
You just need to change : Code:

if(!empty($product-&gt;length) &amp;&amp; !empty($product-&gt;width)){ $quantity = $quantity*$product-&gt;length*$product-&gt;width; }

to: Code:

if(!empty($product-&gt;length)){ $quantity = $quantity*$product-&gt;length; }

in its code.

Last edit: 9 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 9 months ago [\#258438](#258438) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258438 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Also, please note that this requires the Business edition as custom item fields are only available with that edition.

The following user(s) said Thank You: [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#258450](#258450) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258450 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Thank You

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago -  9 years 9 months ago [\#258575](#258575) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258575 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Can't find price override plugin. It is not the same as HikaShop Custom Quantity plugin, right?
The problem is that the price does not change depending on the length value.

Last edit: 9 years 9 months ago by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#258578](#258578) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258578 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

Please provide more details about your issue.
As written in the FAQ, the plugin requires item custom fields to let the customer enter the dimensions when he add the product in the cart.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#258621](#258621) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258621 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi, Jerome!

custom_quantity_width_length.php :

&lt;?php
jimport('joomla.plugin.plugin');
class plgSystemCustom_quantity_width_length extends JPlugin{
}

if(!function_exists('hikashop_product_price_for_quantity_in_cart') &amp;&amp; !function_exists('hikashop_product_price_for_quantity_in_order')) {
function hikashop_product_price_for_quantity_in_cart(&amp;$product){
$currencyClass = hikashop_get('class.currency');
$quantity = @$product-&gt;cart_product_quantity;
if(!empty($product-&gt;length)){
$quantity = $quantity*$product-&gt;length;
}
$currencyClass-&gt;quantityPrices($product-&gt;prices,$quantity,$product-&gt;cart_product_total_quantity);
}

function hikashop_product_price_for_quantity_in_order(&amp;$product){
$quantity = $product-&gt;order_product_quantity;
if(!empty($product-&gt;length)){
$quantity = $quantity*$product-&gt;length;
}
$product-&gt;order_product_total_price_no_vat = $product-&gt;order_product_price*$quantity;
$product-&gt;order_product_total_price = ($product-&gt;order_product_price+$product-&gt;order_product_tax)*$quantity;
}

- [ ![1&#95;2016-12-31.PNG](/forum/attachment/35367) ](/forum/attachment/35367 "1&#95;2016-12-31.PNG") [ ](/forum/attachment/35367?download=1 "1&#95;2016-12-31.PNG")
- [ ![5&#95;2016-12-31.PNG](/forum/attachment/35368) ](/forum/attachment/35368 "5&#95;2016-12-31.PNG") [ ](/forum/attachment/35368?download=1 "5&#95;2016-12-31.PNG")
- [ ![2&#95;2016-12-31.PNG](/forum/attachment/35369) ](/forum/attachment/35369 "2&#95;2016-12-31.PNG") [ ](/forum/attachment/35369?download=1 "2&#95;2016-12-31.PNG")
- [ ![3.png](/forum/attachment/35370) ](/forum/attachment/35370 "3.png") [ ](/forum/attachment/35370?download=1 "3.png")
- [ ![4&#95;2016-12-31.PNG](/forum/attachment/35371) ](/forum/attachment/35371 "4&#95;2016-12-31.PNG") [ ](/forum/attachment/35371?download=1 "4&#95;2016-12-31.PNG")
- [ ![6&#95;2016-12-31.PNG](/forum/attachment/35372) ](/forum/attachment/35372 "6&#95;2016-12-31.PNG") [ ](/forum/attachment/35372?download=1 "6&#95;2016-12-31.PNG")
- [ ![7.PNG](/forum/attachment/35373) ](/forum/attachment/35373 "7.PNG") [ ](/forum/attachment/35373?download=1 "7.PNG")
- [ ![8.PNG](/forum/attachment/35374) ](/forum/attachment/35374 "8.PNG") [ ](/forum/attachment/35374?download=1 "8.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 9 months ago [\#258633](#258633) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258633 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

In the code you copy pasted, coming from the plugin, you can see that the variable is called "length", but in your screenshots, you can see that the custom field column name is "lenght".
Because of that difference, the plugin won't use the value entered in the custom field.

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#258686](#258686) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#258686 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Thank you very much for your time, and I went to learn English

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#259937](#259937) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#259937 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Is it possible to output full lenght in checkout cart?
[ ![65454-3.png](/forum/attachment/35681) ](/forum/attachment/35681 "65454-3.png")

- [ ![65454-3.png](/forum/attachment/35681) ](/forum/attachment/35681 "65454-3.png") [ ](/forum/attachment/35681?download=1 "65454-3.png")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#259938](#259938) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#259938 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

Sure it is possible.
You will need to perform a view override of the checkout cart view, add a column in the table and display the product length in the corresponding cell.
In the cart products you will find all information coming from the product table ; so you will have the product dimensions.
[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#260097](#260097) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260097 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

I tried to change the code in checkout / cart.php, but nothing good came of it.
I have successfully created a new column but still could not change value to quantity*length.
Do I need to create new class "hikashop_cart_product_full_length"?
I take the length from custom_quantity_width_length.php (HikaShopCustom Quantity plugin).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 9 months ago [\#260100](#260100) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260100 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

In checkout/cart.php the quantity is available in $this-&gt;row-&gt;cart_product_quantity and the length is available in $this-&gt;row-&gt;length
The HTML class of the element is not important.

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 9 months ago [\#260230](#260230) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260230 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi again.
I'm sorry that wasting your time, but I did not reach any success with this problem.
I can't find $this-&gt;row-&gt;cart_product_quantity and $this-&gt;row-&gt;length In checkout/cart.php (txt in the attachment).
Still need to output length*quantity value before CART_PRODUCT_UNIT_PRICE.
I not quite understand the code, but understand that I need copy-paste and customize these fragments: Code:

&lt;td data-title="&lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt;" class="hikashop_cart_product_price_value"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;unit = true; echo $this-&gt;loadTemplate(); ?&gt; &lt;?php if(HIKASHOP_RESPONSIVE){ ?&gt;&lt;span class="visible-phone"&gt;&lt;?php echo JText::_('PER_UNIT'); ?&gt;&lt;/span&gt;&lt;?php } ?&gt; &lt;/td&gt;

Code:

&lt;th id="hikashop_cart_product_price_title" class="hikashop_cart_product_price_title hikashop_cart_title"&gt; &lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt;

Can you tell me how to do it correctly?
Maybe I can give even some information?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 8 months ago [\#260265](#260265) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260265 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

You can do like that for example: Code:

&lt;td data-title="&lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt;" class="hikashop_cart_product_price_value"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;unit = true; echo 'calculation: ' .($this-&gt;row-&gt;cart_product_quantity * $this-&gt;row-&gt;length); echo $this-&gt;loadTemplate(); ?&gt; &lt;?php if(HIKASHOP_RESPONSIVE){ ?&gt;&lt;span class="visible-phone"&gt;&lt;?php echo JText::_('PER_UNIT'); ?&gt;&lt;/span&gt;&lt;?php } ?&gt; &lt;/td&gt;

The following user(s) said Thank You: [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")

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

- **[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")**
- [![adm&#95;memphis's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile") Topic Author
- [ Offline](/forum/user/46206-adm-memphis)

Less More

- Posts: 22
- Thank you received: 0
-
-

9 years 8 months ago -  9 years 8 months ago [\#260345](#260345) by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")  Replied by *[adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260345 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Thank you very much!
I used this modification: Code:

&lt;th id="hikashop_cart_product_price_title" class="hikashop_cart_product_price_title hikashop_cart_title"&gt; &lt;?php echo JText::_('CART_PRODUCT_FULL_LENGTH'); ?&gt; &lt;/th&gt;

Code:

&lt;td data-title="&lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt;" class="hikashop_cart_product_price_value"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;unit = true; if(empty($this-&gt;row-&gt;length)) if(empty($this-&gt;row-&gt;length100)) if(empty($this-&gt;row-&gt;length25)) echo "&lt;div style='text-align:right'&gt;".''; else echo "&lt;div style='text-align:right'&gt;" .$this-&gt;row-&gt;cart_product_quantity * $this-&gt;row-&gt;length25,'m'; else echo "&lt;div style='text-align:right'&gt;" .$this-&gt;row-&gt;cart_product_quantity * $this-&gt;row-&gt;length100,'m'; else echo "&lt;div style='text-align:right'&gt;" .$this-&gt;row-&gt;cart_product_quantity * $this-&gt;row-&gt;length,'m'; ?&gt; &lt;?php if(HIKASHOP_RESPONSIVE){ ?&gt;&lt;span class="visible-phone"&gt;&lt;?php echo JText::_('PER_UNIT'); ?&gt;&lt;/span&gt;&lt;?php } ?&gt; &lt;/td&gt;

It's almost perfect! I am very grateful to you for it, but there was formed an empty space to the right of tax calculation.
[ ![878770.PNG](/forum/attachment/35777) ](/forum/attachment/35777 "878770.PNG")

I also try to display "Length: 2m" instead
"Length
:2m"
for now I do not know how to do it.

- [ ![878770.PNG](/forum/attachment/35777) ](/forum/attachment/35777 "878770.PNG") [ ](/forum/attachment/35777?download=1 "878770.PNG")

Last edit: 9 years 8 months ago by [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NoZWNrb3V0Lzg4ODA3MC1wcmljZS1xdWFudGl0eS14LWxlbmd0aC14LXByaWNlLXBlci1tZXRlcj90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86286
- Thank you received: 14263
-
-

9 years 8 months ago [\#260354](#260354) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price = quantity x length x price per meter?](/forum/27-checkout/888070-price-quantity-x-length-x-price-per-meter#260354 "-- url of the page with the problem -- : localhost -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome Версия 55.0.2883.87 m  We need to sell a certain length profiles. Specify a price per meter, and the choice of the length that the price remained the same (per square meter), and the factor has changed and applied to the final price. For example, on the product page: the price per square meter € 1, option: The length of 2.5 meters. In order: 1 Profile of length 2.5 meters of 2.5 €. price = quantity x length x price per meter Is that possible?")*

Hi,

You just need to increase the colspan in this code by the number of columns you add : Code:

if($this-&gt;params-&gt;get('show_cart_image')) $td = '&lt;td colspan="3" class="hikashop_cart_empty_footer"&gt;&lt;/td&gt;'; else $td = '&lt;td colspan="2" class="hikashop_cart_empty_footer"&gt;&lt;/td&gt;';

The following user(s) said Thank You: [adm\_memphis](/forum/user/46206-adm-memphis "View adm&#95;memphis's Profile")

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

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

[](#top)
