Access to PrestaShop corporate website
Bonjour, Invité |
| S'inscrire
Se souvenir de moi Mot de passe oublié ?
Site Map Plan du site Contact us Contactez-nous
PrestaShop e-commerce software
  746 Membres en ligne
Forum  >  English Forum  >  Third party modules  >  Fil

1 de 2
1
Répondre
Nouveau sujet
[MODULE] Force Currency

offline
Publié : 23 Décembre 2008 02:46 PM   [ Ignorer ]
Apprentice
RankRank

Messages :

  • au total : 50
  • 7 derniers jours : 0
Inscrit: 2008-11-16

This module allows your store to manage inventory in one currency, and sell in another. For example your default currency is Euros, but you want to sell your products to the USA, in Dollars. So add US Dollars as a currency to your shop, then install this module and configure US Dollars as the forced currency. Even if you have the Currency Block module installed, your customers will not be able to select another currency. Your currency in the Back Office will remain the default currency, Euros, in this example.

Limitations:
Obviously you can only use one default shop currency and one forced currency. If you have other currencies installed they will not be able to be used.

On the first page load, you may notice a page refresh. This is the only way I could manage to refresh the currency cookie and reload the currencies. If anyone has a better solution please feel free to update this code. Likewise, you will see a refresh after configuring the module. If there is a better solution – please contribute.

Installation:

After installing the module, for best performance, you must use the Module “Positions” sub-tab and move this module to the very first position in the “Top of pages” block.

About:
I built this module for my own business use, and am freely sharing it. This module however is totally unsupported! Do not expect me to make fixes, or answer any questions by email or in the Prestashop forum. I just don’t have time. If I make any updates to this code, I will post them, but that’s it. Sorry.

Fichiers joints
forcecurrency.zip  (Taille du fichier : 4KB - Téléchargements : 613)
 
offline
Publié : 23 Décembre 2008 10:13 PM   [ Ignorer ]   [ # 1 ]
Club Member
RankRankRank
Avatar

Messages :

  • au total : 152
  • 7 derniers jours : 0
Inscrit: 2008-09-05

Thanks for sharing… I’ll check this…

 Signature 

Now Online (23rd May 2009): Gift Le Lo
Marghoob Suleman
Guys please do not make any test order on my site. You are welcome to visit and shop smile

 
offline
Publié : 24 Décembre 2008 01:18 AM   [ Ignorer ]   [ # 2 ]
V.I.P.
RankRankRankRank
Avatar

Messages :

  • au total : 503
  • 7 derniers jours : 0
Inscrit: 2008-11-15

Thanks for sharing clokwise

 Signature 

SIGNATURE & AVATAR OFF

 
offline
Publié : 24 Décembre 2008 04:36 AM   [ Ignorer ]   [ # 3 ]
Apprentice
RankRank

Messages :

  • au total : 35
  • 7 derniers jours : 0
Inscrit: 2008-07-09

Thanks for sharing everyone.

MERRY CHRISTMAS!

 
offline
Publié : 24 Décembre 2008 04:42 AM   [ Ignorer ]   [ # 4 ]
Apprentice
RankRank

Messages :

  • au total : 50
  • 7 derniers jours : 0
Inscrit: 2008-11-16

One additional note: You also need to go to the Payments tab and under “Payment module restrictions” select the same currency you forced with the module for each payment method. Otherwise your customers will instead see your default currency when they pay (at PayPal or wherever).

 
offline
Publié : 18 Mars 2009 03:57 PM   [ Ignorer ]   [ # 5 ]
Regular
RankRank

Messages :

  • au total : 100
  • 7 derniers jours : 0
Inscrit: 2008-09-17

not working under COD module (Cash on delivery )
Need help

 Signature 

http://kittyshop.ro/category.php?id_category=7
Accesorii pentru evenimente

 
offline
Publié : 18 Mars 2009 04:38 PM   [ Ignorer ]   [ # 6 ]
Club Member
RankRankRank

Messages :

  • au total : 133
  • 7 derniers jours : 0
Inscrit: 2008-11-22

Thanks for sharing…

 Signature 

It’s More Than Just a Shop!

 
offline
Publié : 08 Avril 2009 01:03 AM   [ Ignorer ]   [ # 7 ]
Newcomer
Rank

Messages :

  • au total : 4
  • 7 derniers jours : 0
Inscrit: 2009-04-08

i dont think the problem is solved. the module just changes the frontend currency, how about backend? i did install your module, but the admin control panel is still euro, how can i use pounds in the admin panel? thanks

 
offline
Publié : 08 Mai 2009 01:05 AM   [ Ignorer ]   [ # 8 ]
Apprentice
RankRank

Messages :

  • au total : 21
  • 7 derniers jours : 0
Inscrit: 2009-01-05

this module have a lot of bugs

first one is that the forced currency is not working on featured products EVER

 
offline
Publié : 26 Mai 2009 11:40 AM   [ Ignorer ]   [ # 9 ]
Apprentice
RankRank

Messages :

  • au total : 21
  • 7 derniers jours : 0
Inscrit: 2009-01-05

I think that the problem is from the homefeatured module, I found this code in homefeatured.php this one could be the problem.

if anyone knows how to figured out this… many 10x

function hookHome($params)
    
{
        
global $smarty;
        
$category = new Category(1);
        
$nb intval(Configuration::get('HOME_FEATURED_NBR'));
        
$products $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb $nb 10), 'date_add''DESC');
        
$smarty->assign(array(
            
'allow_buy_when_out_of_stock' => Configuration::get('PS_ORDER_OUT_OF_STOCK'false),
            
'max_quantity_to_allow_display' => Configuration::get('PS_LAST_QTIES'),
            
'category' => $category,
            
'products' => $products,
            
'currency' => new Currency(intval($params['cart']->id_currency)),
            
'lang' => Language::getIsoById(intval($params['cookie']->id_lang)),
            
'productNumber' => sizeof($products)
        ));
        return 
$this->display(__FILE__'homefeatured.tpl');
    
}

}

 
offline
Publié : 12 Août 2009 02:42 AM   [ Ignorer ]   [ # 10 ]
Apprentice
RankRank

Messages :

  • au total : 35
  • 7 derniers jours : 2
Inscrit: 2008-07-15

This Module Didnt work for me just sent my page in to a refresh loop after configuring

 
offline
Publié : 04 Septembre 2009 09:43 PM   [ Ignorer ]   [ # 11 ]
Senior Member
RankRankRank

Messages :

  • au total : 322
  • 7 derniers jours : 4
Inscrit: 2009-03-07

if you don’t want to use a module make this modifications:

in init.php before:

$currency Tools::setCurrency();

add:
$cookie->id_currency intval(Configuration::get('PS_CURRENCY_FRONT_DEFAULT'));

in admin/tabs/AdminCurrencies.php after:

'PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency:'), 'desc' => $this->l('The default currency used in shop'), 'cast' => 'intval''type' => 'select''identifier' => 'id_currency''list' => Currency::getCurrencies()),

add:
'PS_CURRENCY_FRONT_DEFAULT' => array('title' => $this->l('Default currency front:'), 'desc' => $this->l('The default currency used in front shop'), 'cast' => 'intval''type' => 'select''identifier' => 'id_currency''list' => Currency::getCurrencies()),

that’s it! now go to admin->payment->currencies and set up your default shop currency. Customer CAN change the currency if needed.

 Signature 

http://www.cureducere.ro

 
offline
Publié : 19 Septembre 2009 12:49 AM   [ Ignorer ]   [ # 12 ]
Partner
RankRankRankRankRank
Avatar

Messages :

  • au total : 2930
  • 7 derniers jours : 0
Inscrit: 2008-07-29

Hi !

I am looking for another function : how may I change the decimal parameter, but ONLY on product.tpl pages ?

I am searching for that since 4 hours now, and I despair…
want to get 200,00 to 200 – so without decimals (but only in product.tpl page)

many tks in advance…

 Signature 

Fabrice
http://www.my-deco-shop.com
Projet: Checkout-Pro
si vous avez un shop et des ambitions :
If you have a shop and are ambitious: Store Commander

 
offline
Publié : 18 Mars 2010 03:13 PM   [ Ignorer ]   [ # 13 ]
Senior Member
RankRankRank
Avatar

Messages :

  • au total : 273
  • 7 derniers jours : 3
Inscrit: 2009-08-06

Thanks Radu..

 Signature 

===============================
5555 İletişim Hizmetleri

Referanslarımız
http://macmarketi.com (Located in Prestashop Showcase)
http://suwenshop.com
http://deryayinevi.com.tr
http://portobelloshop.com
http://alabilirsin.com
http://macdeposu.com
==============================

 
offline
Publié : 08 Mai 2010 04:13 AM   [ Ignorer ]   [ # 14 ]
Newcomer
Rank

Messages :

  • au total : 3
  • 7 derniers jours : 0
Inscrit: 2010-03-05

thanks Radu… just what i needed for my shop

 
offline
Publié : 11 Juin 2010 06:00 PM   [ Ignorer ]   [ # 15 ]
Senior Member
RankRankRank
Avatar

Messages :

  • au total : 273
  • 7 derniers jours : 3
Inscrit: 2009-08-06

Radu - 04 Septembre 2009 09:43 PM
if you don’t want to use a module make this modifications:

in init.php before:

$currency Tools::setCurrency();

add:
$cookie->id_currency intval(Configuration::get('PS_CURRENCY_FRONT_DEFAULT'));

in admin/tabs/AdminCurrencies.php after:

'PS_CURRENCY_DEFAULT' => array('title' => $this->l('Default currency:'), 'desc' => $this->l('The default currency used in shop'), 'cast' => 'intval''type' => 'select''identifier' => 'id_currency''list' => Currency::getCurrencies()),

add:
'PS_CURRENCY_FRONT_DEFAULT' => array('title' => $this->l('Default currency front:'), 'desc' => $this->l('The default currency used in front shop'), 'cast' => 'intval''type' => 'select''identifier' => 'id_currency''list' => Currency::getCurrencies()),

that’s it! now go to admin->payment->currencies and set up your default shop currency. Customer CAN change the currency if needed.

when I use this forcecurrency module all store order email effected. For example after the shopping prestashop sending order mail correct amount to customer, but another order email which is store owner getting has a wrong amount… would you tell me how can i fix this..

Images jointes
wrong_amount.jpgcorrect_amount.jpg
 Signature 

===============================
5555 İletişim Hizmetleri

Referanslarımız
http://macmarketi.com (Located in Prestashop Showcase)
http://suwenshop.com
http://deryayinevi.com.tr
http://portobelloshop.com
http://alabilirsin.com
http://macdeposu.com
==============================

 
 
1 de 2
1
Réponse rapide
Nouveau sujet