create account

QUIQQER Order Module - Multi Currency Feature by pcsg-dev

View this thread on: hive.blogpeakd.comecency.com
· @pcsg-dev · (edited)
$35.03
QUIQQER Order Module - Multi Currency Feature
<center>
![QUIQQER Order](https://github.com/QUIQQER/order/raw/master/bin/images/Readme.png)
</center>

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

- https://github.com/QUIQQER/order 

### 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?

- [cc49331](https://github.com/QUIQQER/order/commit/cc49331cc231a5264c3bd8a5d47443136d93f8a5)
- [13aaabc](https://github.com/QUIQQER/order/commit/13aaabc9b04860c2798cf695503330dccc2b6ab9)
- [8777853](https://github.com/QUIQQER/order/commit/8777853e2b91dff0f375b6071980f55036b452d9)

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://cdn.steemitimages.com/DQmXcHHDuS5FQdDMKg5GYHECiJgXdB7s33gQe252svjdgec/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://cdn.steemitimages.com/DQmU1ZPJ1WdgfpqsFN7jmWenMS9neVGXpvMajnj8Ru13DD8/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://cdn.steemitimages.com/DQmVAKR4QjK7tsnCL9MmrnHUh3gdRXUC4XwY8brsUWe8jUK/image.png)

(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](https://cdn.steemitimages.com/DQmbVJBK5JYbYPyYiqL9pACqGHyDLudsiuKWP8n46QzV1tS/Auswahl_086.png)

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

![Auswahl_087.png](https://cdn.steemitimages.com/DQmYpnnkY6h5gb3kUNfp5pYPuRoqbV6k1Rds7YC3jYr2c6V/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](https://cdn.steemitimages.com/DQmYAf4ntHLZe258b5UVwJXsfsQikHox9AHqwS4nnPGjD1i/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](https://cdn.steemitimages.com/DQmehDA3iCr9tSHr2oyHi3yiUSVVMcHZpysGn2Epx8kaeSf/Auswahl_089.png)

![Auswahl_090.png](https://cdn.steemitimages.com/DQmYRXSR56a9Hq2q3rvKUridhwGGFhZpjzHtTVnD2ynFoZZ/Auswahl_090.png)

![Auswahl_091.png](https://cdn.steemitimages.com/DQmTUvWdcvjseSq71GnhBAKFvJ2x2nLdM6Ye2awkRzsLX5K/Auswahl_091.png)

#### GitHub Account

- https://github.com/dehenne


Thanks for reading,
Hen, for PCSG Developers
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 95 others
properties (23)
authorpcsg-dev
permlinkquiqqer-order-module-multi-currency-feature
categoryutopian-io
json_metadata{"tags":["utopian-io","development"],"image":["https://github.com/QUIQQER/order/raw/master/bin/images/Readme.png","https://cdn.steemitimages.com/DQmXcHHDuS5FQdDMKg5GYHECiJgXdB7s33gQe252svjdgec/Auswahl_083.png","https://cdn.steemitimages.com/DQmU1ZPJ1WdgfpqsFN7jmWenMS9neVGXpvMajnj8Ru13DD8/Auswahl_084.png","https://cdn.steemitimages.com/DQmVAKR4QjK7tsnCL9MmrnHUh3gdRXUC4XwY8brsUWe8jUK/image.png","https://cdn.steemitimages.com/DQmbVJBK5JYbYPyYiqL9pACqGHyDLudsiuKWP8n46QzV1tS/Auswahl_086.png","https://cdn.steemitimages.com/DQmYpnnkY6h5gb3kUNfp5pYPuRoqbV6k1Rds7YC3jYr2c6V/Auswahl_087.png","https://cdn.steemitimages.com/DQmYAf4ntHLZe258b5UVwJXsfsQikHox9AHqwS4nnPGjD1i/Auswahl_088.png","https://cdn.steemitimages.com/DQmehDA3iCr9tSHr2oyHi3yiUSVVMcHZpysGn2Epx8kaeSf/Auswahl_089.png","https://cdn.steemitimages.com/DQmYRXSR56a9Hq2q3rvKUridhwGGFhZpjzHtTVnD2ynFoZZ/Auswahl_090.png","https://cdn.steemitimages.com/DQmTUvWdcvjseSq71GnhBAKFvJ2x2nLdM6Ye2awkRzsLX5K/Auswahl_091.png"],"links":["https://github.com/QUIQQER/order","https://github.com/QUIQQER/order/commit/cc49331cc231a5264c3bd8a5d47443136d93f8a5","https://github.com/QUIQQER/order/commit/13aaabc9b04860c2798cf695503330dccc2b6ab9","https://github.com/QUIQQER/order/commit/8777853e2b91dff0f375b6071980f55036b452d9","https://github.com/QUIQQER/order/commit/cc49331cc231a5264c3bd8a5d47443136d93f8a5#diff-233be8e71c9a13ec09578c69493fdeed","https://github.com/QUIQQER/order/commit/13aaabc9b04860c2798cf695503330dccc2b6ab9#diff-74613366e362b8b41659c7e727cdb929","https://github.com/dehenne"],"app":"steemit/0.1","format":"markdown"}
created2019-03-30 09:45:39
last_update2019-04-02 05:32:30
depth0
children7
last_payout2019-04-06 09:45:39
cashout_time1969-12-31 23:59:59
total_payout_value26.662 HBD
curator_payout_value8.364 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,592
author_reputation41,490,075,306,333
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,194,375
net_rshares49,402,676,387,507
author_curate_reward""
vote details (159)
@justyy ·
$16.24
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](https://join.utopian.io/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](https://review.utopian.io/result/3/2-3-2-2-2-2-1-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjustyy
permlinkre-pcsg-dev-quiqqer-order-module-multi-currency-feature-20190331t205633473z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-3-2-2-2-2-1-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-03-31 20:56:36
last_update2019-03-31 20:56:36
depth1
children1
last_payout2019-04-07 20:56:36
cashout_time1969-12-31 23:59:59
total_payout_value12.305 HBD
curator_payout_value3.934 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length965
author_reputation280,616,224,641,976
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,271,765
net_rshares22,057,825,103,692
author_curate_reward""
vote details (22)
@utopian-io ·
Thank you for your review, @justyy! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-pcsg-dev-quiqqer-order-module-multi-currency-feature-20190331t205633473z-20190403t000737z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-04-03 00:07:39
last_update2019-04-03 00:07:39
depth2
children0
last_payout2019-04-10 00:07:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation152,955,367,999,756
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,394,118
net_rshares0
@steem-ua ·
#### 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](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-quiqqer-order-module-multi-currency-feature-20190331t222541z
categoryutopian-io
json_metadata"{"app": "beem/0.20.19"}"
created2019-03-31 22:25:42
last_update2019-03-31 22:25:42
depth1
children0
last_payout2019-04-07 22:25:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length287
author_reputation23,214,230,978,060
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,276,132
net_rshares0
@steemitboard ·
Congratulations @pcsg-dev! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@pcsg-dev/posts.png?201903301041</td><td>You published more than 80 posts. Your next target is to reach 90 posts.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@pcsg-dev) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=pcsg-dev)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/steem/@steemitboard/3-years-on-steem-happy-birthday-the-distribution-of-commemorative-badges-has-begun"><img src="https://steemitimages.com/64x128/http://u.cubeupload.com/arcange/BG6u6k.png"></a></td><td><a href="https://steemit.com/steem/@steemitboard/3-years-on-steem-happy-birthday-the-distribution-of-commemorative-badges-has-begun">3 years on Steem - The distribution of commemorative badges has begun!</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-pcsg-dev-20190330t113226000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-03-30 11:32:24
last_update2019-03-30 11:32:24
depth1
children2
last_payout2019-04-06 11:32:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,399
author_reputation38,975,615,169,260
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,197,414
net_rshares0
@pcsg-dev ·
STOP
properties (22)
authorpcsg-dev
permlinkre-steemitboard-steemitboard-notify-pcsg-dev-20190331t184922864z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-03-31 18:49:27
last_update2019-03-31 18:49:27
depth2
children1
last_payout2019-04-07 18:49:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation41,490,075,306,333
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,264,956
net_rshares0
@steemitboard ·
Notifications have been disabled. Sorry if I bothered you.
To reactivate notifications, drop me a comment with the word `NOTIFY`
properties (22)
authorsteemitboard
permlinksteemitboard-notify-pcsg-dev-20190331t192535000z
categoryutopian-io
json_metadata""
created2019-03-31 19:25:36
last_update2019-03-31 19:25:36
depth3
children0
last_payout2019-04-07 19:25:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length129
author_reputation38,975,615,169,260
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,266,800
net_rshares0
@utopian-io ·
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](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

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

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-quiqqer-order-module-multi-currency-feature-20190401t061443z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-04-01 06:14:45
last_update2019-04-01 06:14:45
depth1
children0
last_payout2019-04-08 06:14:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length590
author_reputation152,955,367,999,756
root_title"QUIQQER Order Module - Multi Currency Feature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,289,809
net_rshares0