Problems with address validation

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302285

-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 5.6.39
-- Browser(s) name and version -- : Google Chrome 71.0.3578.98

Hi
We have recently upgraded from an ancient version of Hikashop running on Joomla 2.5 and enjoying the new versions of Hikashop & Joomla, but one of the things which has got me puzzled is the address validation and product pricing in order management in the back end.
When a new order is created in the back end, the address fields are not being validated with a Javascript error showing up in the Console on change of field: hikashopToggleFields is not defined at HTMLInputElement.onchange
If there are any errors in the address validation, the new address details are reset to blank - which irks the staff members a bit :)
I understand this should be placed in the current document by a call to jsToggle(...) as that is where the JS is, but that does not seem to be added in the order screen in the back end.

I was wondering whether this is causing issues with product pricing too (but that is not throwing any exceptions in the console). We have products which are discounted according to how many are purchased. In the front end the prices manage themselves, but when adding products in the back-end the unit price is not changed when I add in multiple products. Again staff complain :)

The same is happening in production and in development (development is now running PHP7.1 because I am upgrading all source to be PHP7 compliant)

Any pointers to help fix these last few issues would be greatly appreciated.

DJ

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302287

Hi,

The address validation was indeed not displaying the error message properly and keeping the data entered in the form. I've added a patch on our end so that it works properly. You can download again the install package on our website and install it on yours to get the patch for that.

The price is indeed not refreshed based on the quantity entered. However, that was never the case, even in old versions of HikaShop. If you want that, it would require some development. We just didn't consider that useful enough to spend the work adding that since most of the time the unit price is good enough and in the vast majority of shops, you don't normally add products to orders.

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302324

Thanks, will download the new version later today when our server is a bit quieter.

I must have done some development on our side then - been a long while since I did that! I will look over the source and see what changes there are. We do take quite a few orders over the phone and the best way we found was to create a new order and fill everything in through the back end (with correct prices applied) and that would automatically create the back-end links to the online courses we are selling.

Thanks

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302362

Thanks: Address validation working - but JS error still being thrown about hikashopToggleFields not being defined.

Our old version was Hikashop 1.6.0 Business and that does seem to pick up the price changes correctly. Add 1 course gives 27.99, add 10 courses gives 22.99 per course. I cannot see any changes I have made in the back-end code in that area :( Only changes I made to core code seem to be in the user.php under types to link users back to CMS users of a certain type only...

Will continue comparing notes between then and now and make a plan

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302365

Hi,

Thank you for your feedback. You can ignore the JS error. We'll do something about it for the next release but it's not really a problem.

Regarding the price/quantity, could you do some screenshots of the process in the old version so that we can see what you have ? As least we should be able to say if that's something that was there by default or added on your end, or if we're actually looking at two different things.

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302407

Hi

I can give you access to a copy of the old system... First thing I did was take a couple of backups and have a copy running on public server and my own private server (at home). Now we have a functioning live site I still have a copy on my server where you can have a look and possibly access to code too :) Not going to publicize it here though :)

Can I PM you the details?

Last edit: 5 years 3 months ago by chawbs.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302408

Hi,

You can use our contact form and include a link to this thread for private information:
www.hikashop.com/support/contact-us.html
However, I would still need the screenshots from you, to make sure that what I'm looking at is the same thing as what you're looking at.
We might just be talking about different things.

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302435

Hi

Screen shots (edited to hide details) attached (hopefully)

(1) shows new order created
(2) shows selection of product
(3) shows selecting 10 items to add
press OK and you have discounted code
(4) shows discount, normal single price being 27.99

-DJ

Attachments:

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302457

Hi,

Ah yes, I see what you mean. That indeed worked like that in really old versions of HikaShop. I had forgot about that as it's been years that the interfaces there changed.

I've made some changes to the interface to be able to support that again. You can download again the install package on our website and install it on yours to get the patch for that.

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302461

Just realised I replied with the business account after downloading the package under that name...

Thanks for getting onto this so quickly, but there is an issue here still as it seems to only be picking up the first level of discount.
i.e.
1 = 27.99 (correct)
5 = 24.99 (correct)
10 = 24.99 (should be 22.99)
50 = 24.99 (should be 18.99)
etc

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302481

Hi,

Ah yes, I had missed that detail when I did my tests as I only had two prices.
I've made a patch for that.
You can download again the install package on our website and install it on yours to get the patch for that.

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

  • Posts: 10
  • Thank you received: 0
5 years 3 months ago #302588

Thanks so much guys!

I finally had time to test today after major issues with "google safe browsing" banning the whole ".theworkpc.com" domain (domain DNYU.COM uses to give dynamic address DNS for customers) ... which effectively took much of my development sites offline until I could rename all my dynamic addresses to use .ooguy.com instead!

After testing at home and public test server I have made the code live & all working nicely!

One issue which caught me out on live server - the RBS WorldPay Business gateway code which is released with Hikashop is not the latest code [release 0.0.1] (as per copy in github [release 3.0.1]) so breaks the checkout portal. Throws up "mootools" not found error & when you go into "payment methods" to edit it in the back-end it gives two sets of "save/close/cancel" buttons which require second clicks to close the setup form. Do you want me to raise this as another issue or is this because it was originally 3rd party (brainforge)??

-DJ

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 3 months ago #302595

Hi,

There is no " RBS WorldPay Business gateway code which is released with Hikashop". The install package of HikaShop do not include that plugin since years ago, when we moved that outside of the package and put it instead on github.
I suppose that maybe you had installed an old version of HikaShop at one point on the website and didn't uninstall that plugin, or something like that.

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

  • Posts: 10
  • Thank you received: 0
5 years 2 months ago #303186

Hi Nicolas
I figured out where the RBS Gateway code is coming from - there is a version 0.0.1 in a folder:
/administrator/components/com_hikashop/extensions//plg_hikashoppayment_bf_rbsbusinessgateway
This gets re-installed when I update HikaShop.
I downloaded the ZIP from github for the latest RBS gateway (last updated 2 years ago) and that installs fine as a Joomla install, but does not update the extensions folder listed above. Is there a correct way to update those folders in the extensions folder, or do I have to maintain that manually? I'm assuming the extensions folder will not get overwritten by an upgrade to HS...
Thanks for the updates which are working well :)
-DJ

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 2 months ago #303211

Hi,

If you want to update these plugins in the future, you can redownload their install packages on our github and install them via the Joomla installer. HikaShop won't touch them when you update it.
Note however that we don't plan on breaking the backward compatibility with payment plugins in the future so there should be no need updating them in the future unless the payment gateway makes changes to their API which require mofidying the plugins.

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

  • Posts: 10
  • Thank you received: 0
5 years 2 months ago #303257

Hi

Am I wrong in reading the code? From what I see, after installation of HikaShop (i.e. an update) the code then cycles through the 'extensions' and re-applies/updates those. It seems those 'extensions' are the ones held in the /administrator/components/com_hikashop/extensions folder (which I believe are the first extensions installed way back in 1.6 days)

My issue is that the extensions folder contains these very old versions of the payment plugin and those re-appears after the installation of the update. I can then re-install the payment plugin (github version) through Joomla and it all works without further changes... But, that plugin in the extensions folder (/administrator/components/com_hikashop/extensions) is not updated because the plugin goes directly to /plugins/hikashoppayment/bf_rbs...etc where it is used from. For now I have copied the github version into the extensions folder listed above and hope that will then be the version re-applied after the next update :)

Can I simply remove the unwanted items in the extension folder, or do I have to remove entries in the database too?

-DJ

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 2 months ago #303276

Hi,
If you have old versions of the plugins in that folder it would indeed overwrite the current version of the plugins you have installed.
You want to delete the whole /administrator/components/com_hikashop/extensions folder. That folder is just for the installation/update of the modules and plugins and isn't used after that.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum