gs Posted December 30, 2010 Share Posted December 30, 2010 Good morningI would like to make a category X has $ currencyand category Y has USD currensy.My idea:When you click on the category X: to run the same statement that executes "blockcurrencies"to change euros to dollarsWhen you click on the category Y: to run the same statement that executes "blockcurrencies"to change dollars to euros.But not how to do this.Or another idea?URGENTTT!Sorry for my bad english. I speak spanish (i from uruguay)Thank you Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 Change line 21 of category.php (in PrestaShop v1.3.5) from: $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); to: $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); if ($category->id == 3) $cookie->id_currency = 1; elseif ($category->id == 4) $cookie->id_currency = 2; Change 3 to the ID of the category that should change to currency 1 and 4 to the ID of the category that should change to currency 2. You can use AND to select more categories in the if statements. Link to comment Share on other sites More sharing options...
gs Posted December 31, 2010 Author Share Posted December 31, 2010 Excelent! Thank you very much.Now, if i want change only the sign? (not the number)For example:T-Shirt : U$S 20Cup: € 20Only change currency's sign when click in the category.Sorry for my bad english again! Link to comment Share on other sites More sharing options...
rocky Posted January 1, 2011 Share Posted January 1, 2011 You can go to Payment > Currencies and change the currency rate to 1, but that sounds wrong to me. How can your prices be the same in both currencies? Link to comment Share on other sites More sharing options...
gs Posted January 1, 2011 Author Share Posted January 1, 2011 THANK YOUUUUUUUUUUUUUUUUUUUUUU!!! I had no ideabecause the administrator will do the currency conversion. Link to comment Share on other sites More sharing options...
gs Posted January 1, 2011 Author Share Posted January 1, 2011 Rocky the last question..How I can create a statement that the verification for the product in that category is housed to display currency for the product? Because if I enter directly into the web of product from a link, it shows me another currency.Sorry for my bad english again again again! Link to comment Share on other sites More sharing options...
rocky Posted January 2, 2011 Share Posted January 2, 2011 Sorry, I have absolutely no idea what you mean. Link to comment Share on other sites More sharing options...
gs Posted January 2, 2011 Author Share Posted January 2, 2011 Sorry, AGAIN:when I enter directly http://www.mydomain.com/product.php?id_product=14 not change the currency of the category.If i enter www.mydomain.com then www.mydomain.com/category.php?id_category=8 later www.mydomain.com/product.php?id_product=14change the currency of the category.how I can make the product page showing the correct currency? (when i enter directly, for example: http://www.mydomain.com/product.php?id_product=14) Link to comment Share on other sites More sharing options...
rocky Posted January 3, 2011 Share Posted January 3, 2011 I understand now. Change line 110 of product.php from: $product = new Product(intval($_GET['id_product']), true, intval($cookie->id_lang)); to: $product = new Product(intval($_GET['id_product']), true, intval($cookie->id_lang)); if ($product->id_category_default == 3) $cookie->id_currency = 1; elseif ($product->id_category_default == 4) $cookie->id_currency = 2; Link to comment Share on other sites More sharing options...
gs Posted January 3, 2011 Author Share Posted January 3, 2011 Great, thank Rocky!strange thing is that when I refresh (F5) the product page, I get the currency of another product, when I refresh (F5) returned the product page I get the right currencyFor Example:Open www.mydomain.com/product=1 (U$S)THEN www.mydomain.com/product=2 (€)Refresh product page 1, appears €Refresh product page 1 again, appears U$SWhat could be the reason?Cookies are not updated quickly? How to solve it? Link to comment Share on other sites More sharing options...
rocky Posted January 4, 2011 Share Posted January 4, 2011 Oops, I forgot to put the line from the first code block into the second code block. I've updated my code. Link to comment Share on other sites More sharing options...
gs Posted January 15, 2011 Author Share Posted January 15, 2011 Hi rocky, can u see this posts?http://www.prestashop.com/forums/viewthread/86419/development/how_employees_can_change_only_your_password/http://www.prestashop.com/forums/viewthread/86418/development/the_text_editor_doesnt_work/That's all I need to finish my store.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now