Unit price / Jednotková, měrná cena

Phoca Cart - complex e-commerce extension
vlna
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 29 Nov 2015, 23:25

Unit price / Jednotková, měrná cena

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
vlna
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 29 Nov 2015, 23:25

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

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Ok, thank you very much.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Ahoj, implementováno ve verzi 3.0.0 RC
https://www.phoca.cz/news/866-phoca-cart ... c-released
If you find Phoca extensions useful, please support the project
Post Reply