'Custom' order statuses don't save

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193785

-- url of the page with the problem -- : local
-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.0
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.4.19
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : none

Hi Jerome,

Coming from HikaMarket 1.5.1, it looks like 1.6.0 (very fresh download) can't deal with 'custom' order statuses anymore. :(

In the configuration are a few fields where order statuses can/must be selected:
1.) -> Your vendor (or any other, of course) -> Vendor options -> Order notification status filter
2.) -> Main -> Email options -> Order notification status filter
3.) -> Main -> Statistics -> Valid order statuses
4.) -> Market options -> General options -> both "Updatable order statuses" & "Valid order statuses"

In any of these, the system only saves 'default' statuses that came 'out of the box' with HikaShop, not 'custom-made/added' order statuses.

So, I've added 'custom' order statuses in HikaShop (e.g. "paid") to the 'default' ones that were already there (e.g. "created").
If I try using a 'custom' status in any of the HikaMarket fields mentioned above and save, the fields are empty again once the page has reloaded.
If I use a 'default' status, it saves fine and displays that status in the field on page reload.
If I use a combo of both, one 'custom' and one 'default', the system only saves and displays the 'default' one.

You should be easily able to reproduce it: just add a new order status in the shop, then try selecting and saving it in the market config where mentioned, save, and watch it vanishing...

It used to work ok in equivalent fields in 1.5.1.



BTW, any update of documentation in sight? ;)


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" )
Last edit: 9 years 8 months ago by lousyfool. Reason: added 4.)

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

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193787

Hmm, interestingly, under
-> Market options -> General options -> Updatable order statuses
I can't delete the "created" status anymore. I don't want any status there (because I don't vendors to be able to update or do anything else with orders), but whatever I try, since "created" is in there, I can't get it back out anymore - deleting it and saving, and on page reload "created" is back in the field.

Also worked fine in 1.5.1.


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: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #193821

Hi,

For the empty order status field ; it will be fix in the next release.
I will always send some content for the namboxes with multiple elements, so HikaMarket will always see some content for the setting but it requires some code in the "other side" to filter the empty data.
For the moment I made the modification in the config but it could have some side effect in a lot of other parts.

For your first point, I'm sorry but I can't reproduce. I can use my custom order statuses without any issue.

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.

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193835

Jerome wrote: For your first point, I'm sorry but I can't reproduce. I can use my custom order statuses without any issue.


How did you do that?

I just tried it on the demo site demo.hikashop.com :
Created a new order status ("Paid") in the HikaShop backend.
Over to the HikaMarket backend, trying to use it in any of the fields I mentioned.
Nada, niente, nothing, nichts. Doesn't work.

What's the trick you used? Maybe try your demo site, too? ;)


Update:
I just installed a site on my live web server:
Bare-naked J!3.4.0, HS2.4.0, HM1.6.0 - Protostar, demo content, one more super user (you?), nothing else.
Added order status "testing" in HS.
Then tried using it in any of the fields in HM config.
It can't be simpler than that (what can you screw up in this process?), but it does not work.

Now I have tried three (3) sites. Mine here locally, your demo site, my own other minimal site (which you are welcome to try, too).

Please tell me why it works for you? Thanks.


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" )
Last edit: 9 years 8 months ago by lousyfool.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #193843

Hi,

It means that the issue has already been fix for the next version (which is in tests for a release this week).
In the file "administrator/components/com_hikamarket/classes/category.php" you can replace

	$search = array();
	foreach($value as $v) {
		$search[] = (int)$v;
	}
	$query = 'SELECT c.* '.
			' FROM ' . hikamarket::table('shop.category') . ' AS c '.
			' WHERE c.category_id IN ('.implode(',', $search).')';
	$this->db->setQuery($query);
By
	$search = array();
	$f = reset($value);
	if(is_int($f) || (int)$f > 0) {
		foreach($value as $v) {
			$search[] = (int)$v;
		}
		$query = 'SELECT c.* '.
				' FROM ' . hikamarket::table('shop.category') . ' AS c '.
				' WHERE c.category_id IN ('.implode(',', $search).')';
	} else {
		foreach($value as $v) {
			$search[] = $this->db->Quote($v);
		}
		$query = 'SELECT c.* '.
				' FROM ' . hikamarket::table('shop.category') . ' AS c '.
				' WHERE c.category_name IN ('.implode(',', $search).')';
	}
	$this->db->setQuery($query);
To solve the issue.

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.
Last edit: 9 years 8 months ago by Jerome. Reason: fix

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

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193845

Merci Jerome,

But sorry, the exact "new" code block was already in my file (lines 353-370). So, I already had the latest & greatest snippet, and that's not the cure, I fear... :(

Any other ideas?


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: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #193848

Hi,

Edited
It will be fix in the next release. I'm currently talking with Nicolas in order to have a fixed solution for this.

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.
Last edit: 9 years 8 months ago by Jerome.
The following user(s) said Thank You: lousyfool

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

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193852

Jerome wrote: Edited
It will be fix in the next release.


Uh, was just going to report that category_namekey didn't help either... as you sure know yourself by now.
Just for the fun of it, I even tried _alias, haha, because that's a proper term in the database ("testing"), while _namekey is the awkward "status_1425902033_1784386519"...

Anyway, in good hands with you. Let me know if you need a real-world guinea pig before release. ;)

Many thanks again!


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: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #193854

HikaShop is using category_name and does not use the namekey ; even if the category name can be altered by components like falang/joomfish.
Which is something pretty annoying :)


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: lousyfool

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #193860

Just to inform you that I fix the code in the post
www.hikashop.com/forum/22-market-bug-rep...n-t-save.html#193843
with the category_namekey => category_name modification.


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: lousyfool

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

  • Posts: 2143
  • Thank you received: 747
9 years 8 months ago #193866

Aaaah... there goes category_namekey to category_name!

YESSSSS! Changed, and without further a-do the order status "testing" is grinning at me in the namebox... actually, it was still waiting there for me, on loading the config page it was (still) there!

You da man!!! :woohoo:
Thank you, thank you!


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.

Moderators: Obsidev
Time to create page: 0.074 seconds
Powered by Kunena Forum