Page 1 of 1

Unit price / Jednotková, měrná cena

Posted: 01 Dec 2015, 23:37
by vlna
This modification is needed to fullfil obligations based on Czech and EU law Note: Czech law uses "Měrná cena" / Directive Czech translation uses "Jednotková cena"

Image

Modified files (I hope it is complete)

Code: Select all

./components/com_phocacart/models/item.php
./components/com_phocacart/models/category.php
./components/com_phocacart/layouts/product_price.php
./components/com_phocacart/views/items/tmpl/default.php
./components/com_phocacart/views/category/tmpl/default.php
./components/com_phocacart/views/item/tmpl/default.php
./modules/mod_phocacart_product/tmpl/default.php
./media/com_phocacart/css/main.css
./administrator/components/com_phocacart/libraries/phocacart/price/price.php
./administrator/components/com_phocacart/libraries/phocacart/product/product.php
./administrator/components/com_phocacart/models/forms/phocacartitem.xml
./administrator/components/com_phocacart/views/phocacartitem/tmpl/edit.php
./administrator/language/cs-CZ/cs-CZ.com_phocacart.ini
./administrator/language/en-GB/en-GB.com_phocacart.ini
Files are available from http://uloz.to/xR7ew9JN/phocacart-unitprice-tar-gz

Product table phocacart_products need 2 new columns - unit_amount and unit_unit

If some file is missing let me know, I will reupload it.

It is my first Joomla experience and code may be ugly or even buggy.

Re: Unit price / Jednotková, měrná cena

Posted: 02 Dec 2015, 16:46
by Jan
Hi, thank you very much for this modification and guide.

Questions:

1) Did you create a parameter for this. I can imagine, not all Phoca Cart users are located inside EU, so this can be displayed when set in parameter.
2) I didn't take a look at the modification, so maybe my second question does not make any sense, but: Are the two columns (unit_amount and unit_unit) needed. Is there a way to use (maybe only partially) the existing unit items here (see image):
Image

Or did you use them in the modification?

PS: Yes, I think, "jednotková cena" is much more understandable than "měrná cena"

Thank you, Jan

Re: Unit price / Jednotková, měrná cena

Posted: 02 Dec 2015, 20:47
by vlna
Already existing parameters are I guess brutto values used for shipping. According to law you need use netto weight/volume to calculate unit price.

There is not option to disable displaying unit price yet. Condition like if ((unit_price<>0)&&(unit_unit<>'')) { //print unit price here } should solve it.

Image
Image

Re: Unit price / Jednotková, měrná cena

Posted: 12 Dec 2015, 02:12
by Jan
Ok, thank you very much.

Jan

Re: Unit price / Jednotková, měrná cena

Posted: 13 Feb 2016, 04:22
by Jan
Ahoj, implementováno ve verzi 3.0.0 RC
https://www.phoca.cz/news/866-phoca-cart ... c-released