おおよその価格が一定していません
サポートは土曜日と日曜日には機能しないため、一部の金曜日のリクエストには月曜日に回答できます。24〜36営業時間以内にメールが届かない場合は、まずスパムボックスをチェックし、サポートからのメールがない場合は、フォーラムに戻ってここで回答を読んでください。 しない] メールでの回答[noreply@pluginus.net]フォーラムから!! メールはあなたの情報のためだけのものであり、すべての回答はここでのみ公開する必要があります。
サポートは土曜日と日曜日には機能しないため、一部の金曜日のリクエストには月曜日に回答できます。
からの引用 パブロ・ボリセンコ 20年2022月16日06:XNUMXこんにちは
テストしてください
In file - \wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - these functions - https://share.stackovergo.com/image/i20220520133633.png
All the magic happens here - https://share.stackovergo.com/image/i20220520140024.png
こんにちは
テストしてください
In file - \wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - these functions - https://share.stackovergo.com/image/i20220520133633.png
All the magic happens here - https://share.stackovergo.com/image/i20220520140024.png
21年2022月01日04:XNUMXのabd_saからの引用こんにちは
So far everything seems to be good finally :D Thanks a lot
ohh I see where I can modify now, so basically I just need to add another filter inside the
if
of show approx info, but how do you find the name of the filters ?And why the approx word in the cart widget is upper case ?
Another question (which is not technical), I just need to know your opinion, do you think using
Approx
is good from a customer perspective ? do you know any example of an e-commerce website using it ?
こんにちは
So far everything seems to be good finally :D Thanks a lot
ohh I see where I can modify now, so basically I just need to add another filter inside the if
of show approx info, but how do you find the name of the filters ?
And why the approx word in the cart widget is upper case ?
Another question (which is not technical), I just need to know your opinion, do you think using Approx
is good from a customer perspective ? do you know any example of an e-commerce website using it ?
21年2022月03日31:XNUMXのabd_saからの引用Another question please, have you changed other files other than the plugin's files ?
I tried to copy the plugin's files from staging to the main website, the apporx prices are shown everywhere which is good, however this inconsistency still in some places, but afterwards it works except in the wallet transactions! just like magic! I don't know why!
I tried to copy the files to the staging again to replicate the issue, but the inconsistency appears again!!
I was trying to know from where this comes from but in vain!
Could you please tell me how do you solve this inconsistency of prices!
Another question please, have you changed other files other than the plugin's files ?
I tried to copy the plugin's files from staging to the main website, the apporx prices are shown everywhere which is good, however this inconsistency still in some places, but afterwards it works except in the wallet transactions! just like magic! I don't know why!
I tried to copy the files to the staging again to replicate the issue, but the inconsistency appears again!!
I was trying to know from where this comes from but in vain!
Could you please tell me how do you solve this inconsistency of prices!
からの引用 パブロ・ボリセンコ 23年2022月10日53:XNUMXこんにちは
but how do you find the name of the filters ? - 残念ながら、私はあなたの質問を理解していませんでした。
And why the approx word in the cart widget is upper case ? - Because the following string is added in the code - https://share.stackovergo.com/image/i20220523084736.png
I just need to know your opinion, do you think using
Approx
is good from a customer perspective ? - Unfortunately we didn't do any research. This functionality is a request from our usershave you changed other files other than the plugin's files ? - All changes are only in this file - \wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php
Could you please tell me how do you solve this inconsistency of prices! - Unfortunately, there is no universal way, for each case an investigation is needed.
こんにちは
but how do you find the name of the filters ? - 残念ながら、私はあなたの質問を理解していませんでした。
And why the approx word in the cart widget is upper case ? - Because the following string is added in the code - https://share.stackovergo.com/image/i20220523084736.png
I just need to know your opinion, do you think using Approx
is good from a customer perspective ? - Unfortunately we didn't do any research. This functionality is a request from our users
have you changed other files other than the plugin's files ? - All changes are only in this file - \wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php
Could you please tell me how do you solve this inconsistency of prices! - Unfortunately, there is no universal way, for each case an investigation is needed.
24年2022月01日04:XNUMXのabd_saからの引用こんにちは、
1- For example
add_filter('woocommerce_cart_total
, array($this, 'woocommerce_cart_total'), 9999, 1);
how to know the name of the filter (or is it called hooks in wp I suppose ? ) herewoocmmerce_cart_total
?2- 3- OK thanks.
4- yeah, but where it comes from!! basically the plugin should take the price, multiply by the rate and
echo
it! Could you please tell me how you are debugging it ? do you use any plugins for that ? Thanks in advance
こんにちは、
1- For example add_filter('woocommerce_cart_total
, array($this, 'woocommerce_cart_total'), 9999, 1);
how to know the name of the filter (or is it called hooks in wp I suppose ? ) here woocmmerce_cart_total
?
2- 3- OK thanks.
4- yeah, but where it comes from!! basically the plugin should take the price, multiply by the rate and echo
it! Could you please tell me how you are debugging it ? do you use any plugins for that ? Thanks in advance
からの引用 パブロ・ボリセンコ 24年2022月10日03:XNUMXこんにちは
Unfortunately I'm not a programming teacher
1 Please read this - https://developer.wordpress.org/plugins/hooks/
4 For debugging I use FTP client. find the desired function using Ctrl+F. To display the desired information (for example, the price) I use the function var_dump()
こんにちは
Unfortunately I'm not a programming teacher
1 Please read this - https://developer.wordpress.org/plugins/hooks/
4 For debugging I use FTP client. find the desired function using Ctrl+F. To display the desired information (for example, the price) I use the function var_dump()
25年2022月07日26:XNUMXのabd_saからの引用こんにちは、
Yeah I am just a beginner who wants to learn more, I am really sorry for my endless questions.
I will try to debug and see if I can know what is happening! Thanks for the information.
Do you know if there is a way to test this functionality with different countries ? I tried a proxy to change the country but it does not work!
こんにちは、
Yeah I am just a beginner who wants to learn more, I am really sorry for my endless questions.
I will try to debug and see if I can know what is happening! Thanks for the information.
Do you know if there is a way to test this functionality with different countries ? I tried a proxy to change the country but it does not work!
からの引用 パブロ・ボリセンコ 25年2022月10日00:XNUMXこんにちは
これを読んでください-https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me
こんにちは
これを読んでください- https://currency-switcher.com/using-geolocation-causes-problems-doesnt-seem-to-work-for-me
26年2022月02日54:XNUMXのabd_saからの引用こんにちは、
Thank you very much for the instructions.
The GeoIP seems to be working, Is there a way to set the store currency to USD and show the approx price always, unless the user change it manually on the woocs widget ?
Now the behavior is when a user -let's say from France- landed on the website, the currency will change to Euro and thereby the approx prices will not show! I want to show the prices in USD for all countries and show the approx prices based on the GeoIP of the user ?
こんにちは、
Thank you very much for the instructions.
The GeoIP seems to be working, Is there a way to set the store currency to USD and show the approx price always, unless the user change it manually on the woocs widget ?
Now the behavior is when a user -let's say from France- landed on the website, the currency will change to Euro and thereby the approx prices will not show! I want to show the prices in USD for all countries and show the approx prices based on the GeoIP of the user ?
からの引用 パブロ・ボリセンコ 26年2022月11日51:XNUMXこんにちは
unfortunately the plugin does not have this feature.
コードをカスタマイズする必要があります。
In file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - find all functions that add "Approx" and change this code - https://share.stackovergo.com/image/i20220526094956.png
こんにちは
unfortunately the plugin does not have this feature.
コードをカスタマイズする必要があります。
In file - wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php - find all functions that add"Approx" and change this code - https://share.stackovergo.com/image/i20220526094956.png
27年2022月08日31:XNUMXのabd_saからの引用こんにちは、
その場合、
$user_currency
常になりますUSD
, even if the user tries to change it manually, the function will get executed again (because the approx price is activated) and it will override the value chosen by the user from the widget.I will try to investigate it more, or if yo have any other hints please let me know.
ありがとうございます。
こんにちは、
その場合、 $user_currency
常になります USD
, even if the user tries to change it manually, the function will get executed again (because the approx price is activated) and it will override the value chosen by the user from the widget.
I will try to investigate it more, or if yo have any other hints please let me know.
ありがとうございます。
からの引用 パブロ・ボリセンコ 27年2022月11日54:XNUMXこんにちは
その場合、
$user_currency
常になりますUSD
, even if the user tries to change it manually, the function will get executed again (because the approx price is activated) and it will override the value chosen by the user from the widget. - Absolutely no! It does not affect the current currency
こんにちは
その場合、 $user_currency
常になります USD
, even if the user tries to change it manually, the function will get executed again (because the approx price is activated) and it will override the value chosen by the user from the widget. - Absolutely no! It does not affect the current currency
28年2022月06日10:XNUMXのabd_saからの引用こんにちは、
But when I tried yesterday I ran into this issue. It worked, however when I wanted to change the currency manually from the widget, it keeps returning back to USD.
Anyways, I managed to get it to work, basically the logic was there, but maybe it is a bug or something.
So here is what I did, maybe it will help someone who wants to achieve the same workflow.
I found that there is a logic for
Welcome user currency activation
(ここに https://prnt.sc/3EQUSJ8n4M0O ) which is set to USD on the plugin settings, so basically on the first visit of the user the currency should be USD. But that's not the case, if the user is from a country which is defined on the GeoIP rules, the currency will be changed accordingly.So after some investigation I noticed that the value you are getting inside the if condition
woocs_first_unique_visit
is never set up on the entire script, that's why this bloc of code will never run.I found that you are setting a similar value inside
function init_geo_currency()
どちらであるwoocs_first_unique_geoip
so I replaced the previous string with this one, and it worked.
However, the previous logic was also good, Maybe in the future, I will need the plugin to change the currency automatically based on the GeoIP rules.
So to not to loose both options, what I did is I added another option to the settings https://prnt.sc/2MHSmXuaTiSy and I added this condition inside the
if
ステートメント最終的なコードは次のとおりです。
1- file ./views/plugin_options_2.php: https://prnt.sc/R75yQlDRCWXu
<!-- another option to whether activate or not the welcome currency -->
<td data-title="<?php echo esc_html__('Option', 'woocommerce-currency-switcher') ?>">
<?php echo esc_html__('Activate welcome currency on first visit', 'woocommerce-currency-switcher') ?>
XNUMX:XNUMX-XNUMX:XNUMX
<td data-title="<?php echo esc_html__('Status', 'woocommerce-currency-switcher') ?>">
<div class="woocs__table-card">
<?php echo draw_switcher23('woocs_activate_welcome_currency', get_option('woocs_activate_welcome_currency', 0)); ?>
XNUMX:XNUMX-XNUMX:XNUMX
<td data-title="<?php echo esc_html__('Description', 'woocommerce-currency-switcher') ?>">
<div class="woocs__table-desc">
<div class="woocs__table-desc-body">
<?php echo esc_html__("If True, on the first visit of the user, the currency will be set to the welcome currency selected above until he change it manually. Leave it False if you want the plugin to change it automatically to the adequate currency based on the GeoIP rules.", 'woocommerce-currency-switcher') ?>
XNUMX:XNUMX-XNUMX:XNUMX
2- file ./classes/woocs.php https://prnt.sc/u_rvOIrOXuj2
( note: there are two places with the same logic, I changed them both)
//ウェルカムユーザー通貨のアクティブ化
if (intval($this->storage->get_val('woocs_first_unique_geoip')) === 0 AND get_option('woocs_activate_welcome_currency', 0)) {
$ this-> is_first_unique_visit = true;
$ this-> set_currency($ this-> get_welcome_currency());
$ this-> storage-> set_val( 'woocs_first_unique_geoip'、1);
}3- file ./classes/woocs.php https://prnt.sc/EWs0Xg7cMXvp
// activate welcome currency
update_option('woocs_activate_welcome_currency', 0);4- file ./classes/woocs.php https://prnt.sc/WsxkSBI38UFu
// activate welcome currency
update_option('woocs_activate_welcome_currency', (int) $_POST['woocs_activate_welcome_currency']);I don't know yet if there are any side effects to what I did, but it worked perfectly so far.
Please give me your feedback or correct me if I made a mistake.
ありがとうございます!
こんにちは、
But when I tried yesterday I ran into this issue. It worked, however when I wanted to change the currency manually from the widget, it keeps returning back to USD.
Anyways, I managed to get it to work, basically the logic was there, but maybe it is a bug or something.
So here is what I did, maybe it will help someone who wants to achieve the same workflow.
I found that there is a logic for Welcome user currency activation
(ここに https://prnt.sc/3EQUSJ8n4M0O ) which is set to USD on the plugin settings, so basically on the first visit of the user the currency should be USD. But that's not the case, if the user is from a country which is defined on the GeoIP rules, the currency will be changed accordingly.
So after some investigation I noticed that the value you are getting inside the if condition woocs_first_unique_visit
is never set up on the entire script, that's why this bloc of code will never run.
I found that you are setting a similar value inside function init_geo_currency()
どちらである woocs_first_unique_geoip
so I replaced the previous string with this one, and it worked.
However, the previous logic was also good, Maybe in the future, I will need the plugin to change the currency automatically based on the GeoIP rules.
So to not to loose both options, what I did is I added another option to the settings https://prnt.sc/2MHSmXuaTiSy and I added this condition inside the if
ステートメント
最終的なコードは次のとおりです。
1- file ./views/plugin_options_2.php: https://prnt.sc/R75yQlDRCWXu
<!-- another option to whether activate or not the welcome currency -->
<td data-title="<?php echo esc_html__('Option', 'woocommerce-currency-switcher') ?>">
<?php echo esc_html__('Activate welcome currency on first visit', 'woocommerce-currency-switcher') ?>
XNUMX:XNUMX-XNUMX:XNUMX
<td data-title="<?php echo esc_html__('Status', 'woocommerce-currency-switcher') ?>">
<div class="woocs__table-card">
<?php echo draw_switcher23('woocs_activate_welcome_currency', get_option('woocs_activate_welcome_currency', 0)); ?>
XNUMX:XNUMX-XNUMX:XNUMX
<td data-title="<?php echo esc_html__('Description', 'woocommerce-currency-switcher') ?>">
<div class="woocs__table-desc">
<div class="woocs__table-desc-body">
<?php echo esc_html__("If True, on the first visit of the user, the currency will be set to the welcome currency selected above until he change it manually. Leave it False if you want the plugin to change it automatically to the adequate currency based on the GeoIP rules.", 'woocommerce-currency-switcher') ?>
XNUMX:XNUMX-XNUMX:XNUMX
2- file ./classes/woocs.php https://prnt.sc/u_rvOIrOXuj2
( note: there are two places with the same logic, I changed them both)
//ウェルカムユーザー通貨のアクティブ化
if (intval($this->storage->get_val('woocs_first_unique_geoip')) === 0 AND get_option('woocs_activate_welcome_currency', 0)) {
$ this-> is_first_unique_visit = true;
$ this-> set_currency($ this-> get_welcome_currency());
$ this-> storage-> set_val( 'woocs_first_unique_geoip'、1);
}
3- file ./classes/woocs.php https://prnt.sc/EWs0Xg7cMXvp
// activate welcome currency
update_option('woocs_activate_welcome_currency', 0);
4- file ./classes/woocs.php https://prnt.sc/WsxkSBI38UFu
// activate welcome currency
update_option('woocs_activate_welcome_currency', (int) $_POST['woocs_activate_welcome_currency']);
I don't know yet if there are any side effects to what I did, but it worked perfectly so far.
Please give me your feedback or correct me if I made a mistake.
ありがとうございます!
からの引用 パブロ・ボリセンコ 30年2022月10日08:XNUMXこんにちは
Thank you for your cooperation!
こんにちは
Thank you for your cooperation!