i changed the currency to chf, but the minicart shows whren empty only $
Sun, 08/16/2015 - 05:27
No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.
Hi,
Could you send us your site url, admin and FTP accounts (forum link as well) to our support email: [email protected]?
We would like to have a check.
site http://makeup-artist-academy.ch/
Cant send the ftp
That is your template code
<?php
global $user;
$quantity = 0;
$order = commerce_cart_order_load($user->uid);
if ($order) :
$wrapper = entity_metadata_wrapper('commerce_order', $order);
$line_items = $wrapper->commerce_line_items;
$quantity = commerce_line_items_quantity($line_items, commerce_product_line_item_types());
$total = commerce_line_items_total($line_items);
$currency = commerce_currency_load($total['currency_code']);
endif;
?>
<!-- MINI CART -->
<div class="mini-cart ">
<!-- HEADER CART -->
<div class="cart-head"> <label><?php print t('My cart'); ?> <span>(<?php print format_plural($quantity, '1', '@count'); ?>)</span></label>
<?php if($quantity > 0): ?>
<p><span><?php print t('Total'); ?>:</span> <?php print commerce_currency_format($order->commerce_order_total['und'][0]['amount'], $order->commerce_order_total['und'][0]['currency_code']); ?></p>
<?php else : ?>
<p><span><?php print t('Total'); ?>:</span> <?php print '$'.$quantity; ?> </p>
<?php endif; ?>
</div>
<!-- END HEADER CART -->
<!-- CART CONTENT -->
<div class="cart-cn">
<?php print $content ;?>
</div>
<!-- END CART CONTENT -->
</div>
<!-- END MINI CART -->
got it!
Have you had solution for this problem?
Hi,
Can you explain me what you actually changed to make the currency shown after total amount configurable ?
In my case, 2 currencies (EUR and USD) will be set available by installation of the Multicurrency module and enabled currency switcher block.
If user switches to EUR the field $order->commerce_order_total['und'][0]['currency_code'] should also be update to €.
I followed this screencast on commerceguys to have product unit prices changed via Rules :
https://commerceguys.com/blog/commerce-module-tuesday-commerce-multicurr...
but this soluition only partially works.
Thanks upfront.
Hi Paradoxx,
We are not very clear about your question but mini cart code is in file block--commerce-cart--cart.tpl.php (md_orenmode/template/blocks)
You can customise as your wish in that file
Or you can use this module https://www.drupal.org/project/commerce_multicurrency (of course you need to make some configuration)
Hi Cindy,
Thanks for your reply..
I already installed multicurrency module, but it is reacting inconsistently, both on product pages as mini-cart.
I am showing you a short screencast how mini-cart is reacting on currency change :
http://www.youtube.com/watch?v=Sp47daU1UKY
1) USD selection is changing mini-cart to EUR, and vica versa
2) as you can see, it is not always reacting on the Component Rule i setted up using this guide : https://commerceguys.com/blog/commerce-module-tuesday-commerce-multicurr...
So maybe, i have to use another variable then the one now used in the block--commerce-cart--cart.tpl.php, which is $order->commerce_order_total['und'][0]['currency_code']. What's your suggestion ?
Hi,
+ We made a demo for you. Please go to Product View > New Arrival, Click on field Price and choose the 2nd opdtion: Display the calculated sell price...
+ Please see the demo image. (Same to others)
+ When you change the currency, its symbol will be changed, too
Ok thank you very much ! That was really helpful.
About the mini-cart price and currency update after user switched currency :
I noticed and also previously reported to you that the total price was not updated or updated inconsistently.
I found some reason for that :
It looks like the rules i've been setting up to update commerce-price field in commerce-line-item product references is being executed asynchroniously.
If you wait a few seconds (maximum around 5) and refresh the page, the mini-cart is updated and recalculated correctly based on the new selected currency.
See also my mail about another node-product.tpl issue i solved regarding this currency switcher.
For your information, i am also starting to get this currency switcher properly working for anonymous users in cached site modus, following this drupal thread:
https://www.drupal.org/node/1516128
Regards,
Hi,
Please send us your site url, admin account and FTP account
We want to check this
(remember to check "private message" for security reason)
Hi Cindy,
I am busy copying the site to another hosting environment for testing purposes. Having some issues with database export/import.
As soon as it is solved, i will notify you with the login credentials..
Thanks upfront!
Hi, do you have any idea what this error means ?
I am unable to import my exported database which origines from the orenmode_install_profile.
I remember there were some issues with corrupted fields in the beginning of setting up my orenmode development environment.
Could this be related ?
Hi,
Please check max allowed packet:
max_allowed_packet value to more than 3M (in mysql config my.ini file)
Note: If you meet an error after install (Additional uncaught exception thrown while handling exception…), just change max_allowed_packet value to more than 3M (in mysql config my.ini file), it will work well (commerce module is heavy so it needs more resource).
Hi,
Thanks for your feedback.
I managed to import the database succesfully now. Apparently the error above had nothing to do with the size or amount of data to import.
I tried to split up the sql using this handy tool :
http://www.rusiczki.net/2007/01/24/sql-dump-file-splitter/
and imported the sql slices separately afterwards, but the error was already given on the first slice import, where the databases are declared and the SET_CHARACTER_SET was applied.
So, I just used regular phpMyAdmin database import on the exported sql zip file and it went well.
For the currency issue, you can have a look at this duplicated installation :
http://couture.artstanding.be
I have send login credentials to [email protected]
Thanks upfront for your support!
Regards,