Hi. I have flat rate shipping already (3.50) How do I make priority shipping (6.50)?
I made a php file where I put everything from flat.php to it and changed all flat words to priority. Well it didn't do anything, I can't configure. What do I do?
I made a php file where I put everything from flat.php to it and changed all flat words to priority. Well it didn't do anything, I can't configure. What do I do?
It is not just one file...
admin\controller\shipping_priority.php
admin\language\english\controller\shipping_priority.php
admin\template\default\content\shipping_priority.tpl
catalog\extension\shipping\priority.php
catalog\language\english\extension\shipping\priority.php
If you already have all of these then you need to insert this new payment extension in your store admin.
Then go to user groups and "authorise" yourself to modify it.
Then go back to the payment extension and install it.
There are various posts already which describe this process in more detail if you need them and one by me showing how to get rid of the annoying "self authorisation" required for the store admin.
admin\controller\shipping_priority.php
admin\language\english\controller\shipping_priority.php
admin\template\default\content\shipping_priority.tpl
catalog\extension\shipping\priority.php
catalog\language\english\extension\shipping\priority.php
If you already have all of these then you need to insert this new payment extension in your store admin.
Then go to user groups and "authorise" yourself to modify it.
Then go back to the payment extension and install it.
There are various posts already which describe this process in more detail if you need them and one by me showing how to get rid of the annoying "self authorisation" required for the store admin.
Thanks. I was trying to find anything useful, but couldn't. Can you link me?
How do I authorize it? What name do I need to give it?
Can you tell me step by step like from what folder to what folder do I have to go and how to name it (because I did everything standard and just changed the name flat to priority)? I'm not a programmer.
How do I authorize it? What name do I need to give it?
Can you tell me step by step like from what folder to what folder do I have to go and how to name it (because I did everything standard and just changed the name flat to priority)? I'm not a programmer.
Last edited by anel on Sun Aug 24, 2008 5:06 am, edited 1 time in total.
Ok, Assuming you created a copy of the flat shipping module and renamed all occurences of 'flat' to 'priority' inside those files, then you should have ended up with the 5 files:
admin\controller\shipping_priority.php
admin\language\english\controller\shipping_priority.php
admin\template\default\content\shipping_priority.tpl
catalog\extension\shipping\priority.php
catalog\language\english\extension\shipping\priority.php
Now, in order to install it, go to the OpenCart Admin panel:
Select the menu Extensions > Shipping
This will list the available shipping modules.
Click on the Insert-button and then enter the following details:
Extension Name: Priority Rate
Description: Priority Rate Shipping
Code: priority
Directory: shipping
Filename: priority.php
Controller: shipping_priority
Click on the Save button.
Now you need to authorize yourself before proceeding with the installation and configuration.
Go to Admin > Configuration > Users > User Group
This will show a list of user groups.
Click on the Update-icon on the right side for the top adminstrator
For both the Access and Modify multichoice lists enable the new 'shipping_priority' entries (using Ctrl-Right-Click)
Now continue with the installation of your new shipping module.
Go back to the Extensions > Shipping menu
Click on the Install-icon (a 'Plus' symbol) to the right for your 'Priority Rate' entry to install it.
Click on the Configure-icon to the right to show the configuration screen and enter your configuration values.
admin\controller\shipping_priority.php
admin\language\english\controller\shipping_priority.php
admin\template\default\content\shipping_priority.tpl
catalog\extension\shipping\priority.php
catalog\language\english\extension\shipping\priority.php
Now, in order to install it, go to the OpenCart Admin panel:
Select the menu Extensions > Shipping
This will list the available shipping modules.
Click on the Insert-button and then enter the following details:
Extension Name: Priority Rate
Description: Priority Rate Shipping
Code: priority
Directory: shipping
Filename: priority.php
Controller: shipping_priority
Click on the Save button.
Now you need to authorize yourself before proceeding with the installation and configuration.
Go to Admin > Configuration > Users > User Group
This will show a list of user groups.
Click on the Update-icon on the right side for the top adminstrator
For both the Access and Modify multichoice lists enable the new 'shipping_priority' entries (using Ctrl-Right-Click)
Now continue with the installation of your new shipping module.
Go back to the Extensions > Shipping menu
Click on the Install-icon (a 'Plus' symbol) to the right for your 'Priority Rate' entry to install it.
Click on the Configure-icon to the right to show the configuration screen and enter your configuration values.
Last edited by JNeuhoff on Sun Aug 24, 2008 9:59 pm, edited 1 time in total.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Hi anel,
Edit the file admin\controller\extension.php by commenting out several lines as follows.
I would welcome comments by anyone who can find or knows of any negative impact in removing this annoying little segment of code.
Edit the file admin\controller\extension.php by commenting out several lines as follows.
Code: Select all
// if (count($array) == 3) {
// $setting_info = $database->countRows($database->parse("select * from setting where type = '?' and `group` = '?'", $array[1], $result['code']));
// } else {
$setting_info = $database->countRows($database->parse("select * from setting where `group` = '?'", $result['code']));
// }
This is in there for a good a reason and shouldn't be commented out.I would welcome comments by anyone who can find or knows of any negative impact in removing this annoying little segment of code.
Some extension controller names consist of 3 parts, separated by '_' characters, such as 'module_catalog_category', as opposed to those extensions which have only 2 parts in their controller names, such as 'shipping_flat'.
Make sure the controller name for the priority shipping module is something like 'shipping_priority'
I am not sure, but I don't think commenting out the code lines as per Bruce's suggestion is the right way.but configure button doesn't show up. What's wrong?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Also, in the /admin/controller/shipping_priority.php file, in method index, it should contain the lines
and the corresponding /admin/template//content/shipping_expected.tpl file should include this:
Code: Select all
......
if (($request->isPost()) && ($this->validate())) {
$database->query("delete from setting where `group` = 'priority'");
$database->query($database->parse("insert into setting set type = 'global', `group` = 'priority', `key` = 'priority_status', `value` = '?'", $request->get('global_priority_status', 'post')));
.....
}
......
if ($request->has('global_priority_status', 'post')) {
$view->set('global_priority_status', $request->get('global_priority_status', 'post'));
} else {
$view->set('global_priority_status', @$setting_info['global']['priority_status']);
}
.......
Code: Select all
<tr>
<td width="185"><?php echo $entry_status; ?></td>
<td><select name="global_priority_status">
<?php if ($global_priority_status) { ?>
<option value="1" selected><?php echo $text_enabled; ?></option>
<option value="0"><?php echo $text_disabled; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_enabled; ?></option>
<option value="0" selected><?php echo $text_disabled; ?></option>
<?php } ?>
</select></td>
</tr>
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Wow Juergen, I am definitely not batting well lately.
My suggestion was wrong and even if it was right, would not be the answer to the problem with priority shipping.
That bit of code has been problematic for me in the past and today. Opencart in its raw form does not install or uninstall extensions in admin with names in three sections separated by underscores (eg: integration_order_export.php) unless they are in the form something_catalog_something.php or something_admin_something.php
The following is the correct way to deal with it.
cheers
Bruce

My suggestion was wrong and even if it was right, would not be the answer to the problem with priority shipping.
That bit of code has been problematic for me in the past and today. Opencart in its raw form does not install or uninstall extensions in admin with names in three sections separated by underscores (eg: integration_order_export.php) unless they are in the form something_catalog_something.php or something_admin_something.php
The following is the correct way to deal with it.
Code: Select all
$array = explode('_', $result['controller']);
//
// Special case relies on the naming convention
// module_admin_header
// to extract admin as the type in the following query.
// The extra check allows modifiers to have controllers with three sections that do not rely on the special case.
// eg: integration_order_export
//
//if (count($array) == 3) {
if (count($array) == 3 && in_array($array[1], array('admin','catalog')))
{
$setting_info = $database->countRows($database->parse("select * from setting where type = '?' and `group` = '?'", $array[1], $result['code']));
}
else
{
$setting_info = $database->countRows($database->parse("select * from setting where `group` = '?'", $result['code']));
}
cheers
Bruce
Who is online
Users browsing this forum: No registered users and 1 guest