Open Cart decimal_point error on all price - opencart

I recent installed an OpenCart on server. I am facing an error (decimal_point) on all prices. Like up where cart shows (0 item(s) - $0decimal_point00) and bottom where product price is shown. I am new to OpenCart.
How can I solve this problem?

today I've solved this problem.
the
$_['decimal_point']= '.';
is displayed in
catalog/language/language_name/language_name.php
and
admin/language/language_name/language_name.php
but you should copy this line to
catalog/language/language_name/product/product.php
and everything will be ok
PS: language_name should be renamed to a correct name because at first I mistaken with french language pack and rename the folder to french but after I change it to frenc my store worked properly
Good Luck

Add the line
$_['decimal_point']= '.';
in catalog/language/language_name/common/cart.php

I solved this by updating language pack to latest version. It solve it completely.
So the reason is somewhere in language pack.

I went into admin --> Home/Languages and changed the directory value to match what was on the server in a case sensitive way.
On Windows it was working since it is case insensitive and Italian was with capital letter but when uploaded on Linux the case sensitiveness kicked in and this was shoung also strange timestamps.

I had this same problem and I solved it in a very simple and silly way, after trying everything I found on each page about it.
I was showing "decimal_point" in the prices, because the language I configured it as es-cr.php, but the file in Spanish is called es-es.php, by not agreeing, I gave that error, so I just changed the name to es-cr.php and everything works correctly.

I know this is an old thread, but if someone comes across it, the solution is to make sure you have the file [language_name]-[country].php in the following folders:
If the issue is in the admin side, the folder is: admin/language/[language_name]-[language_name] // ex.: for english, the folder is admin/language/en-gb, the filename is en-gb.php.
If the issue is in the store front, the folder is: catalog/language/[language_name]-[language_name] // ex.: for english, the folder is catalog/language/en-gb, the filename is en-gb.php.

Related

Move the storage directory outside of the web directory

In opencart version 3 there is a notification:
It is very imporant that you move the storage directory outside of the
web directory (e.g. public_html, www or htdocs)
Screenshot
I tried by clicking on move button in the picture also tried manually but after trying it is giving weird errors.
You can move storage directory outside of the web directory (e.g. public_html, www or htdocs) in three ways
Automatically Moving
Manual Moving (from admin panel)
Manual Moving ( By editing Config files)...
Assuming that you know first and second methods.Here I will explain the third method to you.
Copy your storage directory from system/storage to public_html, www or htdocs.
Change the following file path from both config files i.e. config.php and admin/config.php as shown below.
define('DIR_STORAGE', 'public_html/storage');
Please replace public_html to your desired path.
I hope this answer might help you.
It is very simple to remove / hide this dialog box:
open 'admin/controller/common/dashboard.php' file
search below line
$data['security'] = $this->load->controller('common/security');
and replace it with below line
$data['security'] = '';
That's it :)
Change directory path as decribed abowe--but when You save the config.php use utf8 encoding. I have worked 2 hour on it- did everithing i found on google, but nothing worked. Just this simple thing!
I also ran into this little problem, and the fault was layer 8 (problems between the keyboard and the chair)
I hadn't read the code that I had to change correctly and I was doing it wrong, I'll explain better in case someone runs into the same problem:
capturing the variable to be deleted
I was just replacing the new directory path, not removing the DIR_SYSTEM variable.
you have to delete DIR_SYSTEM and place the new route. that's all.
For this reason it gave me an error and so I came to this post.
It is my first contribution. I hope this helps you.

content empty when using scrapy

Thanks for everyone in advance.
I encountered a problem when using Scrapy on Python 2.7.
The webpage I tried to crawl is a discussion board for Chinese stock market.
When I tried to get the first number "42177" just under the banner of this page (the number you see on that webpage may not be the number you see in the picture shown here, because it represents the number of times this article has been read and is updated realtime...), I always get an empty content. I am aware that this might be the dynamic content issue, but yet don't have a clue how to crawl it properly.
The code I used is:
item["read"] = info.xpath("div[#id='zwmbti']/div[#id='zwmbtilr']/span[#class='tc1']/text()").extract()
I think the xpath is set correctly and I have checked the return value of this response and it indeed told me that there is nothing under this directory. Results shown here:'read': [u'<div id="zwmbtilr"></div>']
If it has something, there should be something between <div id="zwmbtilr"> and </div>.
Really appreciated if you guys share any thoughts on this!
I just opened your link in Firefox with NoScript enabled. There nothing inside the <div #id='zwmbtilr'></div>. If I enable the javascripts, I can see the content you want. So, as you already new, it is a dynamic content issue.
Your first option is try to identify the request generated by javascript. If you can do that, you can send the same request from scrapy. If you can't do it, the next option is usually to use some package with javascript/browser emulation or someting like that. Something like ScrapyJS or Scrapy + Selenium.

How to add a new language in Sitecore 8?

I'm working on Sitecore 8 and want to add a new language but Im having a message:
The spell checker dictionary does not exist.
Could you please help me?
All the dictionary files are stored in sitecore\shell\Controls\Rich Text Editor\Dictionaries\ directory.
There is no en-AU dictionary there by default (there are en-UK and en-US dictionaries). You can use one of them I guess. Or you can try google en-AU and use something from the Internet "en-AU.tdf" google search.
I had the same issue. I was able to resolve it by editing the "InvalidItemNameChars" setting temporarily.
Our project had a patch for InvalidItemNameChars like this:
This setting is usually in web.config. If you don't find it there, check "/sitecore/admin/showconfig.aspx" for InvalidItemNameChars.
I had to remove the '-' from the value and create the language. You will not get the error on not selecting the spell checker. You can leave it empty.
Once you are done creating the language add the '-' back to the config (in my case it was a patch config).

Sitecore 7.2 Media Library images not working with underscore in the name

I just upgraded a client's test installation of Sitecore to 7.2 (SP1) and now, any image that has an underscore in its name is throwing a 404 error when being referenced by a page. This was actually a series of upgrades from 6.4 so it's quite possible that a config setting somewhere got missed along the way, but I don't see anything standing out at me that would cause this problem.
If I change the image name to not have an underscore, it works fine, and it also works fine if I set "Media.UseItemPaths" to false, but they would prefer it if their image URL's had the file name displayed.
Can anyone help identify what may have gone wrong?
Due to a change in Sitecore 7.1, any replacements specified in encodeNameReplacements are now also applied to media items as well as regular items in the content tree.
One option is to remove the replaceWith="_" declaration, but the likely reason this was added was to possibly replace spaces in your URLs so they do not display with %20. Removing this declaration will mean they return!
You can instead apply the fix specified in this Sitecore Knowledgebase article: Sitecore is unable to open media items when using encodeNameReplacements

How to get multiple language sites set up in Sitecore?

I am just starting to add support for multiple languages on my site... having a spot of trouble. Here are the steps I've taken so far:
In Control Panel -> Globalization, added a new language (German)
Added a new <site> definition in Web.config with hostName="localGerman.com" and language="de". Also added an alias in my hosts file for localgerman.com to point to localhost and added the host header in IIS.
Went to an item in my tree and added a new version for German. Published whole site.
Now, the host/site setup seems to work OK. When to go to http://localgerman.com/ I get my home page, with lots of missing data... there is no German version... so seems to be using the correct language.
However... when I go to the item I've added a German version of, I still get blank data. In the debugger, I can see that Sitecore.Context.Item is the German version... but all the fields are blank. Item["Content"] returns an empty string. If I manually set the language to "en" on the URL (http://localgerman.com/myitem.aspx?sc_lang=en), then I get the English version with data.
What am I missing here?
Also... when loading the German home page... my menu is blank. Presumably because the items which generate this content do not have German versions. I was under the assumption that when a language-specific version for a given item could not be loaded, then the default language version is used? But this does not seem to be the case. Am I wrong?
OK, looks like I just had the language code wrong. Setting the site language to "de-DE" instead of just "de" worked.
This is a little confusing because the default sites use language="en" instead of en-US.
You added a German version of an item, but did you fill in the fields in German ? Any localizable fields (non-shared) will be empty by default when a new version is created. It sounds like you did the other parts correctly.
The menu being blank is expected: When you try to get an language version of an item that doesn't exist, Sitecore will return null.