Decimal separators

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
3 weeks 6 days ago #371766

-- HikaShop version -- : 6.4.1
-- HikaAuction version -- : 6.0.1
-- Joomla version -- : 6
-- PHP version -- : 8.4
-- Browser(s) name and version -- : all

Dear Team

I am writing to report a little issue regarding the bid entry format

Users may copy-paste bid amounts format as Hika shows, that include separators.

The system currently rejects these same entries, which may even prevent someone to bid during the process. see video

To resolve this, I would like to implement a change where the system automatically removes any numbers after the comma and reformats the input into the accepted system format automatically...

Specifically when a user inputs only numbers on the keyboard, the system should automatically format the entry to include the appropriate decimal placement. For example, entering "101250" should automatically display as "101.250" ... (possibly even with the currency: 101.250 )
see example

Could you indicate how we can achieve this please?

Thank you in advance

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
3 weeks 5 days ago #371767

Hi,

Thank you for your feedback. That sounds like a nice addition. I've made the necessary modifications on our end. Download the install package on our website and install it on yours. Then, clear your browser's cache and try again.
It should then work like you describe.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
3 weeks 5 days ago #371770

Hi Nicolas and thanks for your answer

I downloaded and installed the 3 packages of Hika shop business, market and auction
I cleaned the browser's, server's and site's cache
but there is no difference unfortunately

You can have a look at the link I added in the thread and you also have access to the site if you want to have a deeper look please

Thank you

Luca

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
3 weeks 4 days ago #371776

Hi,

It's only HikaAuction you need to update.
I just checked your website and the HikaAuction you have there is the one without the patches I added yesterday. You must have missed something with the procedure.
So, download again the install package on our website, and install it on yours.
It should hopefully work this time.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
3 weeks 4 days ago #371783

Hi Nicolas and thanks for your answer

I definitely must miss something even if the process is always the same... I downloaded the latest version and installed it from the joomla extension installer, but still not working: see video

also please, while HikaShop Business (6.4.1 [2604301037]) and HikaMarket Multivendor (6.1.0 [2604210914]) both display their respective release numbers, HikaAuction Standard 6.0.1 is currently only showing the version number without the associated release number.. where do I check the release number for Hikaauction please?

Thank you

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
3 weeks 4 days ago #371784

Hi,

I checked your site directly. The JavaScript file ( media/com_hikaauction/js/hikaauction.js ) has been correctly updated and it contains the new live formatting functions. However, the auction product page is not outputting the currency configuration that the JS needs to do the formatting. This means the PHP template show_auction.php is still on the older version.

Two likely causes:

1. You have a template override of HikaAuction's auction product display. Please check if the file templates/YOUR_TEMPLATE/html/com_hikaauction/productauction/show_auction.php exists. If so, that override needs to be either updated or removed for the new code to take effect.

2. The file wasn't actually replaced during the install (permission issues, partial extraction). Please check the modification date of components/com_hikaauction/views/productauction/tmpl/show_auction.php on your server. It should be recent. If it's old, you may need to manually delete it and reinstall, or check that your FTP/file user has write permissions.

To confirm which case it is, you can check whether the file components/com_hikaauction/views/productauction/tmpl/show_auction.php contains the line window.auctionPage.currency =
If it doesn't, the install didn't update it.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 6 days ago #371928

Hi Nicolas and sorry for the late reply

we have tested it again and there is still a prob unfortunately

Note from the dev: also please note that even when we use joomla default template "cassiopeia" still exist same bug, so this is not related to override codes on the template

Please see video

Want to remind you that you still have all the credentials in case you wanna have a look to the site

Kindly let us know
Thank you
Luca

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
1 week 5 days ago #371930

Hi,

Thank you for your feedback. I've made the necessary modifications on our end. Download the install package on our website and install it on yours. Then, clear your browser's cache and try again.

Note that like before, I had to make changes in show_action.php so if you have an override on it, you'll have to redo it in order to get the change.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 5 days ago #371931

Hi Nicolas and thanks for your answer

this time I wasn't able to install

first attempt

second attempt

Kindly let me know
Thank you

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
1 week 5 days ago #371932

Hi,

Thanks for that new bug feedback. It is actually caused by the Joomla 6.1 installer being more strict and a problem in the XML of the HikaAuction XML which wasn't surfaced by Joomla on older versions.
I've made a patch for it. Download the install package on our website and install it on yours.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 5 days ago #371933

Hi Nicolas

managed to install..

ok to place normal bids but still no luck with max bid prnt.sc/tk5r9bM62nP6

Thank you

Last edit: 1 week 5 days ago by lucad.

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
1 week 5 days ago #371937

Hi,

Thanks. I've made another patch for this, please check.

The following user(s) said Thank You: lucad

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 5 days ago #371941

Still doesn't work

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

  • Posts: 100
  • Thank you received: 3
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 week 4 days ago #371946

Hi Nicolas

The patch was applied yesterday but did not affect on the template override codes
This morning, the dev put this part codes on the template override too and it is working now

Thank you for your help!

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

  • Posts: 8
  • Thank you received: 8
1 week 3 days ago #371958

Hi Nicolas,

I found a bug in the new bid amount parsing patch.

On a new auction with no previous bids, the “Place a Bid” button submits the raw data-amount value from show_auction.php:

data-amount="<?php echo $this->bid_amount;?>"


Example DOM:
data-amount="50000.00000"

But controllers/product.php now parses the submitted value with localized currency format:
$amount = hikaauction::convertNumber($amount, hikaauction::getCurrencyFormat($currency_id));


If the currency decimal separator is not `.`, convertNumber() treats 50000.00000 incorrectly, strips the dot, and converts it to 5000000000, causing “Invalid amount” because it exceeds 999999999.

Manual “Place max bid” works because the user enters a clean localized/manual value, and after that the normal bid button may start working.

Suggested fix: in convertNumber(), detect already-normalized machine numbers before localized parsing:

if(preg_match('/^-?\d+(\.\d+)?$/', $num))
    return (float)$num;

This keeps raw values like `50000.00000` valid while preserving localized input support. i guess ;)

thank you.


Joomla & Hikashop Dev - JoomlaMax.com
Attachments:
The following user(s) said Thank You: lucad

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
1 week 3 days ago #371961

Hello,

Thanks senioriz, your analysis was exactly right and very helpful.

What was happening: when live formatting is active the bid field submits a canonical "machine" number (plain digits, a dot as the decimal point, the fraction padded to the currency's number of decimals, for example 50000.00000). The server then parsed that value with the currency's display format. For currencies whose decimal separator is not a dot (comma-decimal / dot-thousand locales), there was no comma to find, so the server treated the dot as a thousand separator and dropped it. That turned 50000.00000 into 5000000000, which then failed the amount check. It showed up most clearly with no previous bids, because that is when the raw starting/minimum amount is submitted as-is.

This is now fixed. The server parser recognizes a bare machine number (digits, a dot, exactly the currency's number of decimals) and reads it directly when the currency decimal is not a dot, so the displayed value, the submitted value and the server-side check now always agree. Standard bids and maximum bids both go through the same parser, so both are covered. The change is server-side only; no template or JS override is needed this time.

Download the install package on our website and install it on yours.

The following user(s) said Thank You: senioriz, lucad

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

  • Posts: 8
  • Thank you received: 8
1 week 3 days ago #371964

Thank you Nicolas,
Let me share another bug with you.
The bidderauction view (bids and won) listing have wrong url for items! i guess trying use menu alias! and can not fetch canocial url of product! is possibile check this too?
is using hikashop_contentLink() with product alias fixes it?


Joomla & Hikashop Dev - JoomlaMax.com
Last edit: 1 week 3 days ago by senioriz.
The following user(s) said Thank You: lucad

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

  • Posts: 85623
  • Thank you received: 14041
  • MODERATOR
1 week 3 days ago #371968

Hello,

Thanks senioriz, i've made another patch for this.
Download the install package on our website and install it on yours.

The following user(s) said Thank You: lucad

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

Moderators: Mohamed Thelji
Time to create page: 0.106 seconds
Powered by Kunena Forum