Fair point, but since the config files need to be edited before uploading the site to the hosting provider, I don't see a real problem.LOL yea, but remember contribs are supposed to keep to themselves. Not start modifying every file on your disk.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Hmm... config files should never be touched after the initial install is done. EVER. No cms or cart ever would promote that, and no coder "should" do it unless there's no other way. In fact, my override design idea is trying to make it so that no contrib ever touches a core file. Sure you could add a bunch of code all over to make things easier, but that defeats the purpose of making contribs easy to use for people. In my mind, the store owner shouldn't have to make any manual edits to code.fido-x wrote:Fair point, but since the config files need to be edited before uploading the site to the hosting provider, I don't see a real problem.LOL yea, but remember contribs are supposed to keep to themselves. Not start modifying every file on your disk.
Contribs should be designed so that monkeys can use them.
The file path in this case is easy to get anyway. Just get the mainpath like my example above, then hardcode the 'catalog/controller/' onto the end of it. The structure of OpenCart isn't going to change from store to store.. only the domain and root path.
Last edited by Qphoria on Sun Aug 10, 2008 1:12 am, edited 1 time in total.
I agree, after the initial install is done. But what you're talking about is adding something which would need to be verified in a test environment before uploading to your client's hosting provider.Hmm... config files should never be touched after the initial install is done. EVER.
For example,
Code: Select all
define('HTTP_SERVER', 'http://localhost/');
Code: Select all
define('HTTP_SERVER', 'http://www.domain.com/');
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
But this is a contrib. Unless they are adding it to the official cart code. So this would be added after the cart exists. But like Luv2drv said, the easiest way would be just to get the path and replace admin with catalog. There are a few diff ways, adding one extra line to the config wouldn't hurt, but its also probably not necessary for something so small.
Edit: Resolved it myself, seems the permissions for the group were not set automatically so i did that myself. Works like a dream. Thanks for this!
Sorry to bother you with this as a complete OpenCart newbie but I get this
Sorry to bother you with this as a complete OpenCart newbie but I get this
error when trying to generate the URL aliasses. Any idea what's going on?Permission Denied!
You do not have permission to access this page, please refer to your system administrator.
Last edited by Hedphuq on Wed Aug 13, 2008 6:23 pm, edited 1 time in total.
The following post should solve that problem for good.
http://forum.opencart.com/index.php/top ... ml#msg6177
http://forum.opencart.com/index.php/top ... ml#msg6177
two languages installed...
Warning: vsprintf() [function.vsprintf]: Too few arguments in /home/mcdvorg/public_html/store/library/database/database.php on line 43
Error: Query was empty
Error No: 1065
crap! how to uninstall it?
WTF? store.com/?????????.html it's on second language...
Warning: vsprintf() [function.vsprintf]: Too few arguments in /home/mcdvorg/public_html/store/library/database/database.php on line 43
Error: Query was empty
Error No: 1065
crap! how to uninstall it?
WTF? store.com/?????????.html it's on second language...
Last edited by ried on Thu Aug 14, 2008 11:58 pm, edited 1 time in total.
Here is my finalized version of the dynamic controller generation code tho I think you are working on some language based one. This one just takes the base name of the controller file and auto creates itself dynamically based on the name, instead of using static hard code. This means it will support any new controller files added after this.
(e.g.
controller=home.php --> home.html
controller=account_access.php --> account-access.html
controller=custom_name.php --> custom-name.html
etc.
)
It's here if you want it
Remove this:
Replace with This:
(e.g.
controller=home.php --> home.html
controller=account_access.php --> account-access.html
controller=custom_name.php --> custom-name.html
etc.
)
It's here if you want it

Remove this:
Code: Select all
//insert static information
$this->_insert_url_alias('controller=home', 'index.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=contact', 'contact-us.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=sitemap', 'sitemap.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=search', 'search.html'); //NOT YET LOCALIZED
//Accounts
$this->_insert_url_alias('controller=account', 'my-account.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_login', 'login.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_logout', 'logout.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_create', 'create-account.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_success', 'account-created.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_download', 'account-downloads.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_edit', 'edit-account.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_password', 'change-password.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_address', 'address-book.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=account_history', 'order-history.html'); //NOT YET LOCALIZED
//Checkout
$this->_insert_url_alias('controller=cart', 'cart.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_shipping', 'checkout-shipping.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_address&action=shipping', 'change-shipping-address.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_payment', 'checkout-payment.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_address&action=payment', 'change-payment-address.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_confirm', 'checkout-confirm.html'); //NOT YET LOCALIZED
$this->_insert_url_alias('controller=checkout_success', 'checkout-success.html'); //NOT YET LOCALIZED
Replace with This:
Code: Select all
// generate controller list
$arrControllers = array();
$dir_cat_cont = str_replace('admin', 'catalog', DIR_CONTROLLER);
if ($handle = opendir($dir_cat_cont)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && (!is_dir($dir_cat_cont . $file)) && substr($file,1) != '.') {
$arrControllers[] = $file;
}
}
closedir($handle);
}
foreach ($arrControllers as $arrController) {
$this->_insert_url_alias('controller=' . $arrController, str_replace('_', '-', str_replace('.php', '', $arrController)) . '.html');
}
how to uninstall it? i try replace files but it still here...
manual cleaning of sql help's...
this is mod no good. no instructions for uninstall and if the store have more than one (english) lanuages you got a problems. DO NOT INSTALL.
manual cleaning of sql help's...
this is mod no good. no instructions for uninstall and if the store have more than one (english) lanuages you got a problems. DO NOT INSTALL.
Last edited by ried on Fri Aug 15, 2008 6:17 am, edited 1 time in total.
Ried!
The script works fine.. to disable it simply go to admin in the menu, click settings and then check no to use URL Alias!
One thing you must realize is that you should always backup your data before you change your opencart code. I have spent many hours writing, compiling and testing this contribution..
As noted above, changing the use url alias setting will restore your cart.
It is also a bad idea to make comments such as
-Dave
The script works fine.. to disable it simply go to admin in the menu, click settings and then check no to use URL Alias!
One thing you must realize is that you should always backup your data before you change your opencart code. I have spent many hours writing, compiling and testing this contribution..
As noted above, changing the use url alias setting will restore your cart.
It is also a bad idea to make comments such as
they are mis-leading and derogatory to the developers of the contribution. Multi-language support is available, I have got it to a point where it creates pages for each product/category/information/controller in the NATIVE language currently being used. A few db mods are required but it works very well. If you cannot get it to work and want to have it operational on your site, why not contact one of us developers for a quote on setting it up properly?ried wrote: this is mod no good. no instructions for uninstall and if the store have more than one (english) lanuages you got a problems. DO NOT INSTALL.
-Dave
Last edited by david.gilbert on Fri Aug 15, 2008 9:30 am, edited 1 time in total.
Professional Website Services - http://www.davidmgilbert.com/
Active Member
I have with the help of Bruce got it to generate the controller pages in the selected language beyond this..Qphoria wrote: Here is my finalized version of the dynamic controller generation code tho I think you are working on some language based one. This one just takes the base name of the controller file and auto creates itself dynamically based on the name, instead of using static hard code. This means it will support any new controller files added after this.
(e.g.
controller=home.php --> home.html
controller=account_access.php --> account-access.html
controller=custom_name.php --> custom-name.html
etc.
)
i.e ENG = contact-us.html
GER = kontakt.html
This works for all products/cats/info and controller pages i'll get a demo up soon

-Dave
Professional Website Services - http://www.davidmgilbert.com/
Active Member
what is native language? i use two languages in full power, i translate items descriptions and categories at all. so i have no native language...david.gilbert wrote: Ried!
The script works fine.. to disable it simply go to admin in the menu, click settings and then check no to use URL Alias!
One thing you must realize is that you should always backup your data before you change your opencart code. I have spent many hours writing, compiling and testing this contribution..
As noted above, changing the use url alias setting will restore your cart.
It is also a bad idea to make comments such asthey are mis-leading and derogatory to the developers of the contribution. Multi-language support is available, I have got it to a point where it creates pages for each product/category/information/controller in the NATIVE language currently being used. A few db mods are required but it works very well. If you cannot get it to work and want to have it operational on your site, why not contact one of us developers for a quote on setting it up properly?ried wrote: this is mod no good. no instructions for uninstall and if the store have more than one (english) lanuages you got a problems. DO NOT INSTALL.
-Dave
Ah Cool.... that does make more sense in the end result, but somehow there must be a way to make it work dynamically... Maybe I can pass the file name "account_login" to babelfish for the language and get it to return the correct translated versiondavid.gilbert wrote:I have with the help of Bruce got it to generate the controller pages in the selected language beyond this..Qphoria wrote: Here is my finalized version of the dynamic controller generation code tho I think you are working on some language based one. This one just takes the base name of the controller file and auto creates itself dynamically based on the name, instead of using static hard code. This means it will support any new controller files added after this.
(e.g.
controller=home.php --> home.html
controller=account_access.php --> account-access.html
controller=custom_name.php --> custom-name.html
etc.
)
i.e ENG = contact-us.html
GER = kontakt.html
This works for all products/cats/info and controller pages i'll get a demo up soon
-Dave




Last edited by Qphoria on Fri Aug 15, 2008 6:29 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 1 guest