How do I remove per unit price

  • Posts: 12
  • Thank you received: 0
10 years 6 months ago #185152

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3

Hi- On the products page, how do i remove the per unit price?
For example, when you click on a product, it takes you to the item page and show the following:

SPROUT (product name)
$25.00 each (price)
$3.57 / lb (per unit price based on 7 lb) <-- I do not want this line to show.

Please provide detailed steps as this is all new to me.

Thanks,

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 6 months ago #185197

Hi,

In the HikaShop backend, go to System -> Configuration -> Display tab -> Default parameters for products, and set the parameter "Display the cost per unit weight" to "No".


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 84077
  • Thank you received: 13627
  • MODERATOR
10 years 6 months ago #185161

Hi,

Go in the HikaShop configuration and turn off the option "Display the cost per unit weight".

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 7
8 years 9 months ago #252281

-- HikaShop 2.6.4
I would like it to be On, but where I set default unit weight? Right now I have it in 'g', but would like it to be 'kg'.


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 7
8 years 9 months ago #252291

flexsus wrote: -- HikaShop 2.6.4
I would like it to be On, but where I set default unit weight? Right now I have it in 'g', but would like it to be 'kg'.


OK, I found a solution. But this lead me to other questions.
If I have a unit of 450g to 35$ and want it to show price/kg. Then I need to enter 0.450kg instead of enter 450g. Then the price will be 77.78/kg.
The price is 35.00 per unit.

To show different units (each, pack, g, kg) it looks like I need to set this up:
I sell packed products, how can I change "each" text in the product page ?

Under System > Configuration > Advanced settings >
I can get rid of Dimension Symbols and Weight Symbols, like deleting: lb,oz,ozt

1) When my vendors in HikaMarket type in weight, I'm not sure that I can get them to type 0.450 kg. In DK we type 0,450 kg.
Is there a place where I can set this input to fit my Currency Local information. I mean, I have
Format:
%i
and Decimal:
,
and Groups:
.
for currency in DKK.


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 8 years 9 months ago by flexsus.

Please Log in or Create an account to join the conversation.

  • Posts: 84077
  • Thank you received: 13627
  • MODERATOR
8 years 9 months ago #252350

Hi,

The system should handle both comma and dot as separator for the weight field. Is that not the case ?

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 7
8 years 9 months ago #252394

nicolas wrote: Hi,

The system should handle both comma and dot as separator for the weight field. Is that not the case ?


Yes, it does support that. And that's what I have configured. But it's regarding the print/show in pages, invoices, e-mails, etc.
So you will have Danish print/show of currency in Product page listing, e.g. DKK 1.295,50. or 1,5kg.
But when a Vendor add new Products, he/she has to think how the database is saving data (American-style). So he/she has to add a new product to a price of 1,295.50 with a weight of 1.5kg and this will be listed on Product page as 1.295,50
And that's really od for a Dane :silly:

I don't know if there is any solution to it, it's just that I see incoming support trying to explain my Danish vendors why they have to reverse the . and , when adding new products.


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

Please Log in or Create an account to join the conversation.

  • Posts: 84077
  • Thank you received: 13627
  • MODERATOR
8 years 8 months ago #252398

Hi,

If you want to change the way the prices are displayed, you can edit your currency via the menu System>Currencies. There is a setting where you can define the decimal separator.

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 7
8 years 8 months ago #252425

nicolas wrote: Hi,

If you want to change the way the prices are displayed,......


I know, and it works regarding how it's displayed. So I have thousand separator as '.' and decimal separator as ','
It's regarding when Vendors add their products. Here you can only use '.' as decimal separator. Here the behavior does not reflect the display you have set in config.

If one of my vendors type in 34,95 - after save, the price will be 0.0000


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Attachments:
Last edit: 8 years 8 months ago by flexsus. Reason: typo

Please Log in or Create an account to join the conversation.

  • Posts: 26255
  • Thank you received: 4041
  • MODERATOR
8 years 8 months ago #252452

Hi,

I am sorry but that's not the case.
You can type either "34.95" or "34,95" ; it will be read by HikaMarket (and HikaShop) the same way.
pasteboard.co/eOPlIG21d.png

There is a function in HikaShop called "hikashop_toFloat" which convert a string into a float number.
The goal of that function is to split the digits into groups. All digits will be regroup except the last group which will be used for decimals.

Afterwards, YES, by default all prices are displayed with the point as decimal separator and without any separator for thousands.
Because the interface let you configure prices for different currencies it requires a standardization of the numbers and it is not based on the American format : but on the computers one.

Now, because you can override every views in HikaShop and HikaMarket ; you have to possibility to change how the prices are displayed in the interface.
In the view "productmarket / form_price" you will get all the code used for the edition of the prices and by changing the content of "$price->price_value" and "$price->price_value_with_tax" you can format them before their display in the input boxes.
You just have to include the case where these elements will be fully empty and where you want to leave the field empty (and not display a "0,000" data).
You also need to be sure that you will keep enough decimal digits ; HikaShop needs 5 decimals to work properly (otherwise you will have some lost of data and possibly some incorrect saved prices if you're using taxes).

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: flexsus

Please Log in or Create an account to join the conversation.

  • Posts: 136
  • Thank you received: 7
8 years 8 months ago #252538

Hi
OK, I did an override of /productmarket/form_price.php and in line 85 I just did this on the input field showing the product price:

value="<?php echo number_format(@$price->price_value,2, ',' , '.'); ?>"

It then show as 34,95 ;)

I then tried to update price to 12345,98 and it shows as that :P
If I look in database, it is saved as 12.345,98000

Does it not sound correct?

I then just have to find all the places where I would like to show prices, kilo etc. in a Danish way.

It could be, that I could also have used the
$this->currencyHelper->displayPrices
somehow, but could not get it to work.

I will try to see if I can fine tune it with some jQuery that updates the number format when tabbing out of input field, so that 12345,98 is updated for the vendors show to 12.345,98 :woohoo:


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 8 years 8 months ago by flexsus. Reason: typo

Please Log in or Create an account to join the conversation.

  • Posts: 26255
  • Thank you received: 4041
  • MODERATOR
8 years 8 months ago #252552

Hi,

As I wrote in my previous message, if you "round" the price too much, you will loose information and generate wrong prices.

You want a price with tax set to : 34,95
The price without tax would be : 29,125
So by displaying just two digits ; you loose the final "5" and so your price become wrong.

That's why, it does not sound good to me.

See : us3.php.net/manual/en/function.number-format.php

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds
Powered by Kunena Forum
loading