QUIQQER Order Module - Multi Currency Feature

in utopian-io •  6 years ago  (edited)


QUIQQER Order

This module provides an ordering process, extends QUIQQER with a complete order management system and provides different APIs for the ordering process for further modules.

Repository

New Features

What feature(s) did you add?

This week there were some changes in the QUIQQER Order Module. As explained in the last posts we build our system Multi Currency capable. I.e. you have the possibility to offer your products in different currencies.

The problem now is that you have several orders with different currencies in your system. To make this more manageable we have added a filter capability to the administration.

How did you implement it/them?

First, the currency code data had to be available as a separate field in the database. This makes filtering a lot easier. Currently, the currency data was only available in JSON format.

This is quite simple in QUIQQER and only the database.xml needs to be extended.

Auswahl_083.png

(https://github.com/QUIQQER/order/commit/cc49331cc231a5264c3bd8a5d47443136d93f8a5#diff-233be8e71c9a13ec09578c69493fdeed)

Afterwards the currency data in the temporary order and the order had to be considered and stored.

Auswahl_084.png

(https://github.com/QUIQQER/order/commit/13aaabc9b04860c2798cf695503330dccc2b6ab9#diff-74613366e362b8b41659c7e727cdb929)

Since the currency data are now stored in the database and still have their own field, filtering is quite easy to implement. To make this possible in the administration we have decided for a currency drop down which is available in the order panel.

(https://github.com/QUIQQER/order/commit/8777853e2b91dff0f375b6071980f55036b452d9)

First of all we added the Ajax functionality and the ContextMenuItem to the panel so we can access it.

Auswahl_086.png

After that we added a button with a currency context menu to the upper menu bar

Auswahl_087.png

In this case we have to request all available active currencies from the server and add them to the menu.

Auswahl_088.png

Since the interface has been implemented, the filter only has to be sent to the server as well and the search has to be consider the new filter.

Auswahl_089.png

Auswahl_090.png

Auswahl_091.png

GitHub Account

Thanks for reading,
Hen, for PCSG Developers

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  6 years ago 

Thank you for your contribution.

  1. You probably can chain your calls such as $TemporaryInvoice->getArticles()->setUser($this->getCustomer())->setCurrency($this->getCurrency() as currently the getArticles() has been invoked twice.
  2. Two places of comment-out code - better to remove them to keep your codebase clean.
  3. When users switch from one currency to another, it's better to conert the value automatically using third party currency converter API.
  4. No unit tests found to cover the functionalities.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @justyy! Keep up the good work!

Congratulations @pcsg-dev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 80 posts. Your next target is to reach 90 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

3 years on Steem - The distribution of commemorative badges has begun!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

STOP

Notifications have been disabled. Sorry if I bothered you.
To reactivate notifications, drop me a comment with the word NOTIFY

Hi @pcsg-dev!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @pcsg-dev!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!