Not sure that it is the best way to do it but it suits what I need to do. It's also not perfect but I think it covers most things.
This comes as a vQmod and one extra file.
Works for account creation, editing and guest checkout. Can be rolled into affiliate and returns if you wanted to but didn't seem worth worrying about.
It does the following:
Capitalizes First Letters
Capitalizes Hyphen-Names
Decapitalizes short words so you end up with Burton-on-Trent for example.
Decapitalizes certain name words like 'de la' and 'van der'.
Sorts out surname prefixes like MacDonald.
Capitalizes certain address terms like SW, NE and PO.
Has editable exceptions list so you can define more uppercase or lowercase words.
Not completely tested but I don't think you'll have any problems, suggestions welcomed.
Available in the extension store (free), click on link below.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
URLs? You've lost me! Can you elaborate....rph wrote:URLs are case sensitive so I would highly recommend keeping them all lower-case all the time.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
I've rolled this on to Product Names and Category Names as well, add the following to the XML file.
Code: Select all
<file name="admin/model/catalog/product.php">
<operation>
<search position="replace"><![CDATA[
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
]]> </search>
<add><![CDATA[
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . cleanaddress($this->db->escape($value['name']), true) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
]]></add>
</operation>
</file>
<file name="admin/model/catalog/category.php">
<operation>
<search position="replace"><![CDATA[
$this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
]]> </search>
<add><![CDATA[
$this->db->query("INSERT INTO " . DB_PREFIX . "category_description SET category_id = '" . (int)$category_id . "', language_id = '" . (int)$language_id . "', name = '" . cleanaddress($this->db->escape($value['name']), true) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', description = '" . $this->db->escape($value['description']) . "'");
]]></add>
</operation>
</file>
This modification is very essential for me.
I am using custom theme and quick checkout extension.
here is the extension http://www.opencart.com/index.php?route ... 20checkout
I am using sellegance theme from themeforest.
Please let me know how should i get the module work.
I am willing to pay if you please integrate the module for me
At the moment I don't have the time to be doing it for you, but as it is free you can ask someone else to do it for you.
You'll need to go through the controller/model files of the checkout extension and modify in the same way as can be seen in the xml file.
Instances of
= $this->request->post['firstname']
= $this->request->post['address_2']
become:
= cleanaddress($this->request->post['firstname'], true);
= cleanaddress($this->request->post['address_2']);
etc.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Code: Select all
2014-11-24 11:57:30 - PHP Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mijn_domein/public_html/system/library/address_cleaner.php on line 31
2014-11-24 11:57:30 - PHP Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mijn_domein/public_html/system/library/address_cleaner.php on line 39
2014-11-24 11:57:30 - PHP Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mijn_domein/public_html/system/library/address_cleaner.php on line 25
2014-11-24 11:57:30 - PHP Unknown: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mijn_domein/public_html/system/library/address_cleaner.php on line 34
2014-11-24 11:57:30 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mijn_domein/public_html/index.php:106) in /home/domains/mijn_domein_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28
2014-11-24 11:57:30 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mijn_domein/public_html/index.php:106) in /home/domains/mijn_domein_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29
Any help is greatly appreciated.
Tegels en Sanitair Online
https://www.tegelsensanitaironline.nl
Tegelwinkel Den Haag
http://www.tegelwinkeldenhaag.nl
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Where and when??intelcom wrote:Hello.
I want to know how we can Capitalize all the letters not only the first letter.
like grgr to GRGR. Street to STREET.
Thanks.
Thanks.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
OSWorX Sloppy Address Cleaner Capitalize only the first letter Name, Last name, Address, City, etc.OSWorX wrote:Where and when??intelcom wrote:Hello.
I want to know how we can Capitalize all the letters not only the first letter.
like grgr to GRGR. Street to STREET.
Thanks.
Thanks.
We want to capitalize the entire letters. Checks if customers register with uppercase or lowercase whatever like (STreeT) and change them to uppercase no just first letter.
Like
jiM WIlLis
TenesI STReet
GreEn TRee 43100
GREECE
To
JIM WILLIS
TENESI STREET 25
GREEN TREE 43100
GREECE
Am I clear now?
Before :
Code: Select all
$str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
Code: Select all
mb_internal_encoding("UTF-8");
I have noticed if someones name has example King Charles III it returns King Charles Iii looks to be over looking Roman Numerals.
You probably have another mod that is conflicting.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Users browsing this forum: No registered users and 18 guests