Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't save the orderReferenceFormat field #655

Closed
nordentwickler opened this issue Jan 25, 2019 · 3 comments
Closed

Can't save the orderReferenceFormat field #655

nordentwickler opened this issue Jan 25, 2019 · 3 comments
Labels

Comments

@nordentwickler
Copy link

Description

I installed the latest version of craft and craft commerce. After activating the commerce plugin i changed the orderReferenceFormat - which worked. But than i realised, that i need to change the commerce version from lite to pro. So i've done that. Going back to the commerce settings page and i can't change the orderReferenceFormat anymore. By the way the "CMD S" shortcut is not working in the settings section.

Steps to reproduce

  1. Install craft and commerce, active commerce as test-lite-version
  2. Change from lite to pro
  3. Try to change the orderReferenceFormat

Additional info

  • Craft version: 3.1.4
  • Craft Commerce version: 2.0.2
  • PHP version: 7.2
  • Database driver & version: mysql 5.7
  • Plugins & versions:

orderreferenceformat_saving_issue

@engram-design
Copy link
Contributor

Can confirm this, and did work in previous beta's. Looks like its an issue with the Settings Model using load() (which I didn't know about - cool!). See example:

$settings = new SettingsModel();

var_dump($settings->orderReferenceFormat);
var_dump(Craft::$app->getRequest()->getBodyParam('settings.orderReferenceFormat'));

$settings->load(Craft::$app->getRequest()->getBodyParams(), 'settings');

var_dump($settings->orderReferenceFormat);

Produces (I try to change the number from 7 to 8):

string(14) "{{number[:7]}}"
string(14) "{{number[:8]}}"
string(14) "{{number[:7]}}"

What seems odd is that the other fields save just fine (filename format, etc)

@boboldehampsink
Copy link
Contributor

Also seeing this

@lukeholder
Copy link
Member

Thanks for reporting. This is fixed for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants