OpenCart price issues - opencart

I've newly installed Open-Cart and I added my currency and deleted other currencies but when shown, the prices in the website are formatted with "decimal_point" in the middle, like this:
How can I fix this?

Add your currency in Settings → Store as it will set your currency to default and even check if you have correctly submitted your currency values such as decimals.

Check that you have a setting for $_['decimal_point'] in catalog/language/klingon/klingon.php, where "klingon" is the language to display your website in. Note that for English the file is named default.php.
(I got the same issue after an upgrade, because I forgot to add files for my language.)

Related

Remove decimal (.0000) opencart 1.5.6

Hello how I can get ride off decimal on opencart 1.5.6 completly for admin and fronted ?
if my price 5000 then display as it no need add 5000.0000.
I'm try to change from database product price set from 15.4 to 15.0 but its say invalid default value date added.
also already change library/currency but no luck. im out of option to solve this one.
and code for currency is like this
return $string;
change to this
return rtrim($string, '.00');
solve just export to below mysql version and change 15.4 to 15.0 or use notepad or any editor change manually

Adding More Column in Customer OSCommerce Admin Page

i'm a little bit struggling regarding how can i add more column in the costumer tabs in the admin page OSCommerce. As we can i only can display 8 customer in one page. How can i increase it ?
Thank you so much
I can't say for sure without seeing your catalog/admin/customers.php file... Is the following code in your customers.php file?
$customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $customers_query_raw, $customers_query_numrows);
If so, then check the value of MAX_DISPLAY_SEARCH_RESULTS in your database. MAX_DISPLAY_SEARCH_RESULTS is in the 'configuration" table. If it is set to 8 then adjust it to the number of customer rows you prefer to see in the customers table.
Keep in mind that MAX_DISPLAY_SEARCH_RESULTS is used elsewhere and whatever value you adjust it too will be used everywhere MAX_DISPLAY_SEARCH_RESULTS is used.

Django Spreadsheet Application

I am in the making of a Django application where you will be able to upload an excel spreadsheet file and have it inserted into the application. But I sorta got the importing sorted out.
What I need is a way to store the values dynamically, I basicly need X number of fields for each row, with each three possible types.
These would be:
Boolean
String
Number
How would I go about doing so?
Let's say I have some models that contains this information:
A spreadsheet with a name, and some "header"-cells that will indidate which fields (and their name) that belong to that spreadsheet (but dynamically expanding).
A row that can have multiple cells, each with a type of either a boolean, a string or a number.
An example could be like this:
Spreadsheet 100
name (string)
city (string)
religious? (boolean)
phonenumber (number)
and then I need to pair the cells underneath with the appropiate header, like this:
row
name = "Bob Curious"
city = "New York"
religious = "Yes"
phonenumber = "888 888 888"
I hope that explains it good enough, if not, please go ahead and ask for anything you might like explained.
Thanks in advance! :)
This post is pretty old so I'm not sure whether you still need help with your issue, but I've found xlrd to be an excellent tool for scraping spreadsheet data. I would suggest investigating this package further.
Maybe others would like to hear more about the solution for this question. My plugin django-excel would help with excel data import into and export from one or more django models. What's more, the plugin provides one programming interface to handle data in ods(using odfpy or ezodf), xls(using xlrd), xlsx(using openpyxl) and csv formats. I hope it may help you.

webservice for autosuggest on city names / postal codes including long-lat coordinates?

i'm looking for a webservice, to be used for an autocomplete field,
where people can fill in either a postal code / city name or both
this service will need all cities in Europe, so we can use it for all country websites.
and in a later stadium we want to keep the world open for asia and america so this would be a plus.
preferably it would also return the long-lat coordinates for the locations,
Now it is a free textfield, after leaving the field, we hit the google geocoding service,
to find coordinates... preferably i would tie these two together.
so we don't have to query 2 services for one thing.
does anyone know of the existance of such a service online somewhere?
or would you suggest to build our own database with cities / postal codes / coordinates?
if so we would need to get the content from somewhere too, and i was trying to avoid that issue :)
I recently searched for a similar service, in vain.
I wanted my users to have auto-complete on entering a city name, and once a city is chosen I needed to pass the name and lat/long onto the Google API. In the end I did this: -
downloaded the geonames allcountries.zip, full extract: this
Imported it into a SQL DB via SSIS (about 7.5 million records!)
Wrote a simple query to extract just the cities (only the PPLC, PPLA and PPLA2 records).
This left me with a manageable table of 9112 records (with lat / long and country code) which covers all the cities in the world. I then wrote my own code to query the data.
Not ideal, but I needed a solution.
I know this post is very old but for thouse who are looking for a simple solution that can be integrated in 5 minutes here is the link:
Geocomplete jQuery...
For my case I followed this steps:
1 - Download the plugin from here.
2 - Add the jquery.geocomplete.js or jquery.geocomplete.min.js file into your javascript folder of your project.
3 - Call this file in script tags on the html page where you have the input field that you have to autocomplete with cities:
<script src='/PathToTheFile/jquery.geocomplete.js'></script>
4 - To convert an input into an autocomplete field, simply call the Geocomplete plugin in script tags: <script>
$("#IdOfTheInputField").geocomplete(); // Option 1: Call on element.
$.fn.geocomplete("input"); // Option 2: Pass element as argument.
</script>
5- You can check for the complete list of options on the link provided at the top.
Hope that this helped!

Order totals block on Magento order email and invoice email templates

Can anyone point me to the templates/code blocks that are used for the order totals block on the Magento order mail and invoice e-mail templates?
The tax issue is solved but I need to implement some logic to get rid of the shipping and the subtotal. Which templates are used for the emails?
I found the frontend and changed this as needed, but can't find the template/block that is used for the e-mails sent by the system.
Can anyone point me in the right direction?
Thanks,
Bart
Niels answer of app/design/frontend/base/default/template/sales/order/totals.phtml is correct however I thought some further clarification was in order because one doesn't merely make cosmetic changes to this file in order to effect the desired change. totals.phtml loops over the "totals", each of which produces a total-related line-item (Subtotal, Shipping & Handling, Tax, Grand Total (Excl. Tax), and Grand Total (Incl. Tax)). Your best bet is to use Mage::Log to output each of the totals (which are looped over via an associative array $_code => $total). If you log each key ($_code), you'll see names such as subtotal, shipping, grand_total, tax, and grand_total_incl. I filtered out those from the sales order e-mail that I didn't want by adding the following code directly below the foreach:
<?php if (in_array($_code, array('grand_total'))) {
continue;
} ?>
Hopefully this will help anybody who is puzzling over where these totals are mysteriously coming from. :-)
This template is being used for the totals in the e-mail templates and order overview in My Account:
app/design/frontend/base/default/template/sales/order/totals.phtml
Jason's answer is good for telling Magento to not generate the likes of grand_total HTML. However, you should look at System > Configuration > Sales > Tax to see if you can remove the fields the proper way first.
If you then see a message saying "Warning tax configuration can result in rounding errors" at the top of your admin pages, you'll need to adjust your settings. See the manual for the default settings, if you need them.
I am not entirely sure but could it be this one:
\app\design\adminhtml\default\default\template\email\order\items.phtml
Directory might not exactly match yours but I'm sure you would be able to find it.
HTH