-
Rush/Priority Handling Charge
I need a way to allow users to specify "rush handling" and add an appropriate handling charge at checkout time. I couldn't find any work in progress or previously discussed solution.
So far, the best work-around I can think of is to setup a virtual product called "rush handling" and make this available via a sidebox (either customize the shopping cart box or add a new one).
Any other ideas?
Thx.
-
Re: Rush/Priority Handling Charge
What Shipping Module(s) are you using now?
-
Re: Rush/Priority Handling Charge
Default 1.3.5 install. Enabled shipping modules are UPS and USPS.
Let me clarify... Customers can pick shipping priorities just fine, such as next-day-air vs. ground. Also, I have defined a standard handling charge in both my shipping modules that should be added to every order regardless.
I now would like to offer "rush processing" internal to my company, hence the additional handling charge. Ideally, the customer should be able to select this at checkout time, and it should show as a separate line item (similar to either tax or shipping charges), regardless of carrier used or shipping priority specified.
Thx.
-
Re: Rush/Priority Handling Charge
you may be able to use this module with a few modifications. this is for insurance, but you can always change the text and the values for it:
http://www.zen-cart.com/forum/showth...to_threadtools
-
Re: Rush/Priority Handling Charge
Thx. On the surface it looks similar to what I'm looking for. I'll take a closer look tomorrow (later today).
Either way, adding shipping insurance was on my to-do list, so thx for the pointer!
-
Re: Rush/Priority Handling Charge
Quick followup...
Using the Shipping Insurance module as a jump-board worked like a charm. The biggest change was with how taxes are shown. The Shipping Insurance module by default adds any taxes directly into the insurance charge. For my purposes, I wanted to advertise a set charge, so with this default functionality, it made it look like I said $5 on one page, but on the order it shows as $5.50. To fix this, I added an option to have any taxes be added to the appropriate tax-class line on the order total.
In case others may want similar functionality, I have submitted the Priority Order Handling module to the downloads area. It is now available from this link:
http://www.zen-cart.com/index.php?ma...roducts_id=356
Thx again for the help!
-
Re: Rush/Priority Handling Charge
Thanks for creating this mod! I have it installed and it works like a charm. I've had 4 orders in the past 2 weeks for which the customer opted to use this feature.
My new dilemma is this:
I need a way for orders to be searchable to find ones that have "Priority Handling" included. A search via admin on the orders page doesn't come up with anything. For now I have to go thru the orders one by one to be sure I am not overlooking those orders for which the customer paid this extra fee.
Anyone know of a way to make the orders searchable to find ones with Priority Handling? It would make life so much simpler. :yes:
-
Re: Rush/Priority Handling Charge
You are right that it is a bit of a dilemma... There is a separate table that tracks order totals, and the module simply inserts the priority handling charge there. Since the mechanism defines it separated from the order header, a search does not bring it up. This is not unusual... try searching for "ground" (or some other shipping method) or try searching for something from a line-item, such as a product title--same result.
Make a long story short, it would be somewhat of a hairball to display the priority status on the order summary page for the admin view because the architecture has it separated. If you feel adventurous, you can play with ./admin/orders.php, but don't expect a quick one-liner solution.
If you're comfortable with doing MySQL queries, you can try this:
SELECT orders_id FROM orders_total WHERE class = 'ot_handling'
Otherwise, I'd suggest using a separate status as a work-around. Make a status that easily identifies the order as a "priority" order to you. When a new order is received, you should review it in detail as part of your normal process anyway--at this time, you will see the priority handling charge as one of the totals. Set the status to "priority processing" for those order that paid for it, otherwise set it to just "processing." Now, you can see at a glance which orders are pending and which have priority.
Cheers,
markus
-
Re: Rush/Priority Handling Charge
Priority Handling Rate Scale
Vary priority handling rate based on order value/size
Would be great if the Priority Handling charge could have some sliding scale feature based on order value perhaps
Thanks :smile:
-
Re: Rush/Priority Handling Charge
Actually, this is already built into the module. You can setup either a percentage scale or build flat tiers, and the rate charged will vary based on the order sub-total.
Cheers,
markus
-
Re: Rush/Priority Handling Charge
Priority breaks in zen cart 1.3.8. I rely heavily on this, any chance of an update soon?
-
Re: Rush/Priority Handling Charge
Thx for the heads-up. I have not had a chance to upgrade my site to 1.3.8, but plan on doing so before year-end. I will investigate the problem and release a fix as soon as possible.
-ml
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
mlankeit
Thx for the heads-up. I have not had a chance to upgrade my site to 1.3.8, but plan on doing so before year-end. I will investigate the problem and release a fix as soon as possible.
-ml
I'm SOOO relieved that you're as responsive as you are! If I can offer any help (access to my site, whatever), let me know.
Kevin
kevin at kiss wedding books daut com
-
Re: Rush/Priority Handling Charge
Found the problem and fixed it. Look for version 1.2:
http://www.zen-cart.com/index.php?ma...roducts_id=356
-ml
-
Re: Rush/Priority Handling Charge
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
swan
I don't see 1.2?
I submitted the new package about 1am last night--typically it takes 1-2 days before the moderator approves & posts it. It should show up later today or tomorrow.
Cheers,
-ml
-
Re: Rush/Priority Handling Charge
Hello,
I am trying to modify this module so that I can have 3 handling options. 0%, 20%, and 40%. I have edited the config options so that these exist:
MODULE_ORDER_TOTAL_PRIORITY_HANDLING_PER
MODULE_ORDER_TOTAL_PRIORITY_HANDLING_PER2
MODULE_ORDER_TOTAL_PRIORITY_HANDLING_PER3
I'm just not sure how to edit this section to handle 2 additional buttons:
function credit_selection()
{
$selected = (($_SESSION['priority_handling'] == '1') ? true : false);
$selection = array('id' => $this->code, 'module' => $this->title,
'redeem_instructions' => MODULE_ORDER_TOTAL_PRIORITY_HANDLING_TEXT_DESCR.'<br><br>',
'fields' => array(array('field' => zen_draw_radio_field('opt_priority_handling','1', $selected),
'title' => MODULE_ORDER_TOTAL_PRIORITY_HANDLING_TEXT_ENTER_CODE)));
return $selection;
}
Any advice would be VERY appreciated.
-
Re: Rush/Priority Handling Charge
Are you saying you have multiple priority-like services and want to allow the user to pick a-la-carte? If so, the easiest would be to duplicate the module for each of your services, which boils down to a bunch of search-and-replace for each.
If this is not what you are after, please explain what you are trying to do... buttons don't make sense in this context the way you describe them.
-
Re: Rush/Priority Handling Charge
Thanks for your reply. I'm trying to add 3 radio buttons, instead of the single checkbox that this module has.
I tried to duplicate the module as you suggested, but the 2nd duplicated check box option was all that appeared.
I was hoping there might be an easier way than editing the tpl_checkout_payment_default.php file.
-
Re: Rush/Priority Handling Charge
... unfortunately, this doesn't help in explaining your scenario ... Let me try to explain...
When you install the module, you can activate it and configure it--but once it is set, it is set for your zen-cart implementation until you decide to modify it again. So, if you want to have the option of choosing a percentage, then choose "percentage" and enter the percentage you want the module to use (20, 30, etc.). Once you click on "update," this calculation for this service charge would be whatever percentage you elected of the order sub-total.
What I'm hearing from you is that you want to have the option to change this percentage, which you can do right now by typing in the percentage amount you want. Replacing this text field with a series of radio-buttons up doesn't really enhance anything--in fact, it removes functionality--which is why I don't understand your reason for pursuing this...
Anyway, look at how the charge type is implemented and duplicate this for the percentage text-box. Hope this helps!
-
Re: Rush/Priority Handling Charge
Sorry. I'll try to explain it better. I have 3 levels of service, normal-10 day, rush-5 day, and urgent-3 days. The customer chooses which level they want. I need to implement this using radio buttons as I only want them selecting one option with normal-10 day service as default.
I did manage to get this working to some extent by editing the configuration for this module and adding 3 unique percentage levels. Then I edited the array that creates the check box, changed it to radio buttons and added 2 additional fields in that array for the other 2 buttons. The problem is that regardless of which button is selected, the calculation is based on the final percentage in the array.
-
Re: Rush/Priority Handling Charge
Ah... what I assumed on my first reply. OK, so you have 3 levels of service, 2 of which need priority handling, and the customer can pick either-or but not both.
Looks like you are on-track for this by modifying credit_selection()... I got some ideas, but I need to verify if they will work before I will post any code. Back later...
-
Re: Rush/Priority Handling Charge
Hi mlankeit,
I got the fees calculating, just had to add a couple if else statement where the calculation is done based on opt_priority_handling.
Now if I could only format the output so that the title doesn't show up 3 times!
-
Re: Rush/Priority Handling Charge
Any chance this will be updated to work with 139h?
Current Issues:
1. Coupons deduct from the subtotal AND the priority handling fee
2. Gift Certificates funds applied to order total won't apply to the priority handling fee. Instead of a zero balance at the end of check out, the balance due is the total of the priority handling fee (plus shipping insurance as the same issue exists with that mod).
In short, the priority order handling mod and the shipping insurance mod are having problems whenever coupons or gift certificates are used to pay and/or deduct cost from the order total.
Suggestions?
-
Re: Rush/Priority Handling Charge
Sorry, ScriptJunkie, but I just now got your post (didn't get an email notification like usual and I've been very busy...)
Anyway, I'll take a look at what's going on & report back.
Thx.
-ml
Quote:
Originally Posted by
ScriptJunkie
Any chance this will be updated to work with 139h?
Current Issues:
1. Coupons deduct from the subtotal AND the priority handling fee
2. Gift Certificates funds applied to order total won't apply to the priority handling fee. Instead of a zero balance at the end of check out, the balance due is the total of the priority handling fee (plus shipping insurance as the same issue exists with that mod).
In short, the priority order handling mod and the shipping insurance mod are having problems whenever coupons or gift certificates are used to pay and/or deduct cost from the order total.
Suggestions?
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
mlankeit
Sorry, ScriptJunkie, but I just now got your post (didn't get an email notification like usual and I've been very busy...)
Anyway, I'll take a look at what's going on & report back.
Thx.
-ml
No worries. I had some other check out issues as well that got sorted out when I re-did the sort order of all payment methods. I think that may have resolved this issue as well.
Let me double check it and get back to you later today.
-
Re: Rush/Priority Handling Charge
Tested, works fine. Was just a order total sort order issue. Once all mods affecting sort order were properly ordered, the mod works fine.
-
Re: Rush/Priority Handling Charge
I seem to be having trouble with this. I presumed that this would work with the Fast and Easy Checkout add-on, because this (Rush/Priority Handling) was based on another mod created by Numinix (same developer).
Also, on my single page checkout, I get a little update button next to the Priority Handling, which is not present in the standard checkout.
This would lead me to assume that the two are compatible. However, when I choose to accept the handling charge and click the update button, it refreshes the page and the total remains unchanged, while the checkbox becomes unchecked.
This works fine in the standard checkout. It is only having problems with the Fast and Easy checkout enabled. Is Priority Handling incompatible with the newest version of fast and easy checkout, or did I perhaps break something?
-
Re: Rush/Priority Handling Charge
This module has a strange behaviour.
Once it's installed it can't be disabled or set to "Offer Priority Handling=False".
I need to control the module to enable it just for some shipping method.
Even "this->enabled" handling does nothing and option continue to show in payement selection page
-
Re: Rush/Priority Handling Charge
I've found a solution to the problem of previous post looking at Optional Insurance Module ("father" of this module) support thread.
Just put this on top of file (take care of changing brt_brt with your shipping method code):
PHP Code:
if ($_SESSION['shipping']['id'] != 'brt_brt') {
class ot_priority_handling
{
function process() { }
}
} else {
So that file top changes from:
PHP Code:
class ot_priority_handling {
var $title, $output;
to:
PHP Code:
if ($_SESSION['shipping']['id'] != 'brt_brt') {
class ot_priority_handling
{
function process() { }
}
} else {
class ot_priority_handling {
var $title, $output;
and a single:
before last php closing tag at file bottom
-
Re: Rush/Priority Handling Charge
From the last few requests, I am left to conclude that somehow there's been a misconception leading people to somehow believe that this module allows any variance and customization--as if it were some sort of magic silver bullet. Unfortunately, the aim for this module us much less flamboyant. Please allow my to clarify: this module simply makes an adjustment to the "order total" to account for some surcharge in a global manner. I called it "priority handling" but you can assign it another name. Regardless, the point is that it simply adds a single global surcharge that the end-consumer can choose to "add" if they want to. If this is what you are looking for, then this module does what it claims.
However, if you seek a more complex differentiation for either calculating or appling a type of surcharge, then you need to modify the module code yourself to accomplish your goal. As you are invested to achieve your goal, I hope you find the existing code as good starting point to achieve what your need. Personally, I piggied-back on another's code to achieve this module for my needs, and posted it back to the forum to hopefully help others. I would highly recommend that anyone who similarly needs to extend functionality further, to fork the code (meaning your make your own module) and then post it to this community so anyone can download it. I personally think this type of sharing is what builds the essence of community-supported code.
Apologies for any misconception.
Regards,
markus
-
Re: Rush/Priority Handling Charge
[QUOTE=mlankeit;328769]Actually, this is already built into the module. You can setup either a percentage scale or build flat tiers, and the rate charged will vary based on the order sub-total.
Hi Markus,
I 'm building a wine store site. I've manually installed ver 1.51 as per the Zencart instructions and installed numerous add-ons and a new template. This is the set-up on the server:
Apache version: 2.2.23, PHP version: 5.4.12, MySQL version: 5.5.30-log, Architecture: x86_64 &
Operating system: linux
So far, so good but I've run into a snag regarding the handling charge. The packing material is quite expensive and there is no way to come up with a single fair or real handling charge. I need a way to charge the actual costs of the packing material which is determined by how many bottles of wine are purchased; regardless of the price.
Ideally, something that adds the following handing charges is what I need:
1 bottle = $5
2 bottles = $7
3 bottles = $9
6 bottles = $13
12 bottles = $16
Adding combinations for different quantities would also be necessary while using the least expensive box/styrofoam combination for any size order including quantities above 12.
Any assistance or recommendations would be appreciated. I did read your post above but I'm writing to you because you obviously understand Zencart better than I do and I'm not a coder. Do you do custom work for a fee? Thank you in advance,
Larry Andron
-
Re: Rush/Priority Handling Charge
Dear Larry,
Your needs seem very unique to your specific business. Basically, you need to have brand-new module that does this for you. I'm not sure if such a thing exists that can be adapted, but I do know that my module won't do this.
If you are interested in working out a deal to get this coded, contact me at mlankeit######################. I'm currently in China and may not always have access to email, but I will respond.
Thx.
markus
-
Re: Rush/Priority Handling Charge
I order 12 Products of quantity 1 each ... is the charge $16.00?
I order 4 Products of quantity 3 each ... is the charge $16.00 or $9 * 4 for $36.00?
I order 10 Products of quantity 2 each ... what is the charge?
I order 18 Products of quantity 1 each ... what is the charge?
I order 6 Products of quantity 3 each ... what is the charge?
-
Re: Rush/Priority Handling Charge
Hi Markus,
I've been using priority handling module for several years and it worked like a charm. Thank you.
I just upgraded to 1.5.1. If I enable the priority handling module, I got error:
PHP Fatal error: Call to undefined method ot_priority_handling::get_order_total() in /home3/hipgirlc/public_html/store/includes/classes/order_total.php on line 182
Same thing if I enable the insurance module:
PHP Fatal error: Call to undefined method ot_insurance::get_order_total() in /home3/hipgirlc/public_html/store/includes/classes/order_total.php on line 182
I didn't change anything in order_total.php.
Any help would be appreciated.
Thanks
Michelle
-
Re: Rush/Priority Handling Charge
I downloaded the new version of insurance module from the link below and it worked.
http://www.zen-cart.com/downloads.php?do=file&id=232
Will test priority handling later.
Thanks
Michelle
-
Re: Rush/Priority Handling Charge
I just tried it and it works for me... I did a fresh install of 1.5.1 and priority handling 1.2--no problems with install/setup for the module on the admin side and no errors when processing an order as a customer...
Based on this, my guess is that somehow your "upgrade" is gumming things up for you. Maybe it's something simple in the configuration table. Try to uninstall the module and re-install it. If that doesn't work, try installing a new version of 1.5.1, add your customization and then add priority handling. You can install on a new db just to 'test' things and later re-point to your current db using the configure files.
All the best,
-ml
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
mlankeit
I just tried it and it works for me... I did a fresh install of 1.5.1 and priority handling 1.2--no problems with install/setup for the module on the admin side and no errors when processing an order as a customer...
Based on this, my guess is that somehow your "upgrade" is gumming things up for you. Maybe it's something simple in the configuration table. Try to uninstall the module and re-install it. If that doesn't work, try installing a new version of 1.5.1, add your customization and then add priority handling. You can install on a new db just to 'test' things and later re-point to your current db using the configure files.
All the best,
-ml
Thanks a lot. I'll try to uninstall the module and re-install it.
Michelle
-
Re: Rush/Priority Handling Charge
Testing out the Priority Handling addon and found when used in conjunction with the 'Rewards Points' module, it adds additional rewards points (in my case I have a $5 rush handling charge) to the order total/points earned.
I assume this is a Rewards Points issue vs a Priority Handling issue, but thought I would post it here as well.
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
Limitless
Testing out the Priority Handling addon and found when used in conjunction with the 'Rewards Points' module, it adds additional rewards points (in my case I have a $5 rush handling charge) to the order total/points earned.
I assume this is a Rewards Points issue vs a Priority Handling issue, but thought I would post it here as well.
Resolved.
Resolved by going to Configuration -> Rewards Points Configuration -> Advanced Reward Point Calculation Rules and adding in ot_priority_handling and subtract.
-
Re: Rush/Priority Handling Charge
did you ever find a solution to this? I too have priority handling and fast and easy checkout installed and have the same issue. the update buttons don't work. I would settle for just removing the buttons but I cant figure out how to do that. any help would be appreciated. Thanks
JP
Quote:
Originally Posted by
joeyrocket
I seem to be having trouble with this. I presumed that this would work with the Fast and Easy Checkout add-on, because this (Rush/Priority Handling) was based on another mod created by Numinix (same developer).
Also, on my single page checkout, I get a little update button next to the Priority Handling, which is not present in the standard checkout.
This would lead me to assume that the two are compatible. However, when I choose to accept the handling charge and click the update button, it refreshes the page and the total remains unchanged, while the checkbox becomes unchecked.
This works fine in the standard checkout. It is only having problems with the Fast and Easy checkout enabled. Is Priority Handling incompatible with the newest version of fast and easy checkout, or did I perhaps break something?
-
Re: Rush/Priority Handling Charge
My client needs two different priority charges so I duplicated this mod and made enough changes to have it show up in admin. However, only one - the original one - shows up at checkout.
I have carefully gone through and removed anything that can be remotely thought to conflict with the first version - and there was more than usual.
I'm posting the new module here in hopes someone can take a quick look and see if I've missed something or if there's something in the mod that makes it impossible to do this. I don't see the problem!
PHP Code:
<?php
/*
Priority Handling Module
ot_express_handling.php, v 1.0 2003/12/03
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Modified to work with zen cart
Released under the GNU General Public License
*/
class ot_express_handling {
var $title, $output;
function ot_express_handling()
{
$this->code = 'ot_express_handling';
$this->title = MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TITLE;
$this->description = MODULE_ORDER_TOTAL_EXPRESS_HANDLING_DESCRIPTION;
$this->enabled = MODULE_ORDER_TOTAL_EXPRESS_HANDLING_STATUS;
$this->sort_order = MODULE_ORDER_TOTAL_EXPRESS_HANDLING_SORT_ORDER;
$this->credit_class = 'true';
$this->output = array();
}
function process()
{
global $order, $currencies;
if (MODULE_ORDER_TOTAL_EXPRESS_HANDLING_USE == 'true') {
if (! $_SESSION['express_handling']) {
$charge_it = 'false';
} else {
$charge_it = true;
}
// get country/zone id (copy & paste from functions_taxes.php)
if (isset($_SESSION['customer_id'])) {
$cntry_id = $_SESSION['customer_country_id'];
$zn_id = $_SESSION['customer_zone_id'];
} else {
$cntry_id = STORE_COUNTRY;
$zn_id = STORE_ZONE;
}
if ($charge_it == 'true') {
$tax = zen_get_tax_rate(MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_CLASS);
if (MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TYPE =='percent') {
$eh_tax = zen_calculate_tax(($order->info['subtotal'] * MODULE_ORDER_TOTAL_EXPRESS_HANDLING_PER / 100), $tax);
$eh_subtotal = $order->info['subtotal'] * MODULE_ORDER_TOTAL_EXPRESS_HANDLING_PER / 100;
} else {
if ($order->info['subtotal'] > MODULE_ORDER_TOTAL_EXPRESS_HANDLING_OVER) {
$est = MODULE_ORDER_TOTAL_EXPRESS_HANDLING_OVER;
} else {
$est = $order->info['subtotal'];
}
$how_often = ceil($est/MODULE_ORDER_TOTAL_EXPRESS_HANDLING_INCREMENT);
$eh_tax = zen_calculate_tax((MODULE_ORDER_TOTAL_EXPRESS_HANDLING_FEE * $how_often), $tax);
$eh_subtotal = (MODULE_ORDER_TOTAL_EXPRESS_HANDLING_FEE * $how_often);
}
if (MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_INLINE == 'Handling Fee') {
$eh_text = $currencies->format($eh_subtotal+$eh_tax, true, $order->info['currency'], $order->info['currency_value']);
$eh_value = $eh_subtotal+$eh_tax; // nr@sebo addition
} else {
$tax_descrip = zen_get_tax_description(MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_CLASS, $cntry_id, $zn_id);
$order->info['tax_groups'][$tax_descrip]+= $eh_tax;
$eh_text = $currencies->format($eh_subtotal, true, $order->info['currency'], $order->info['currency_value']);
$eh_value = $eh_subtotal; // nr@sebo addition
}
$order->info['tax'] += $eh_tax;
$order->info['total'] += $eh_subtotal + $eh_tax;
$this->output[] = array('title' => $this->title . ':','text' => $eh_text,'value' => $eh_value);
}
} else if ($charge_it == 'false') {
$tax = zen_get_tax_rate(MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_CLASS);
$express_handling = 0;
$order->info['tax'] += zen_calculate_tax($express_handling, $tax);
$order->info['total'] += $express_handling + zen_calculate_tax($express_handling, $tax);
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format(zen_add_tax($express_handling, $tax) + zen_calculate_tax($express_handling, $tax), true, $order->info['currency'], $order->info['currency_value']),
'value' => zen_add_tax($express_handling, $tax));
}
}
function pre_confirmation_check($order_total)
{
return 0.0;
}
function get_order_total() {
global $order;
$order_total_tax = $order->info['tax'];
$order_total = $order->info['total'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
$orderTotalFull = $order_total;
$order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);
return $order_total;
}
function credit_selection()
{
$selected = (($_SESSION['express_handling'] == '1') ? true : false);
$selection = array(
'id' => $this->code,
'module' => $this->title,
'redeem_instructions' => MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TEXT_DESCR.'<br><br>',
'fields' => array(array(
'field' => zen_draw_checkbox_field('opt_express_handling', '1', $selected),
'title' => MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TEXT_ENTER_CODE
))
);
return $selection;
}
function update_credit_account($i)
{
}
function apply_credit()
{
}
function clear_posts()
{
unset($_SESSION['express_handling']);
}
function collect_posts()
{
global $db, $currencies;
if ($_POST['opt_express_handling']) {
$_SESSION['express_handling'] = $_POST['opt_express_handling'];
} else {
$_SESSION['express_handling'] = '0';
}
}
function check()
{
global $db;
if (!isset($this->check)) {
$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_STATUS'");
$this->check = $check_query->RecordCount();
}
return $this->check;
}
function keys()
{
return array('MODULE_ORDER_TOTAL_EXPRESS_HANDLING_STATUS','MODULE_ORDER_TOTAL_EXPRESS_HANDLING_USE', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_SORT_ORDER', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TYPE', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_PER', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_FEE', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_INCREMENT', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_OVER', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_CLASS','MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_INLINE');
}
function install()
{
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Priority Handling Module', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_STATUS', 'true', 'Do you want to enable this module? To fully turn this off, both this option and the one below should be set to false.', '6', '1','zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values('Offer Priority Handling?', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_USE', 'true', 'Do you want to offer express handling?', '6', '2', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values('Sort Order', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_SORT_ORDER', '150', 'Sort order of display.', '6', '3', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values('Priority Handling Charge Type', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TYPE', 'percent', 'Specify whether the handling charge should be a percentage of cart subtotal, or specified as tiers below', '6', '4', 'zen_cfg_select_option(array(\'percent\', \'tiered\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values('Handling Charge: Percentage', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_PER', '5', 'Enter the percentage of subtotal to charge as handling fee.', '6', '5', '', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values('Handling Charge: Fee Tier', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_FEE', '.50', 'Enter the fee tier increment. Handling charge will be: <br> (subtotal/price_tier) * fee_tier', '6', '6', 'currencies->format', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values('Handling Charge: Price Tier ', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_INCREMENT', '100', 'Enter the price tier increment. To setup a flat-fee structure, enter a large value here and your flat fee in the fee tier above. For example, if you want to always charge $10 and your orders are typically around $100, enter $5000 here and $10 in the Fee Tier box.', '6', '7', 'currencies->format', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values('Handling Charge: Price Tier Ceiling', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_OVER', '1000', 'Enter the price tier maximum. For example, the default values setup a 50 cent charge for every $100 assessed up to $1000 of the cart subtotal, or $5 maximum.', '6', '8', 'currencies->format', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values('Tax Class', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_CLASS', '0', 'If handling fees are taxable, then select the tax class that should apply.', '6', '9', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values('Tax Display', 'MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TAX_INLINE', 'Tax Subtotal', 'Can have tax (see above) be added to the tax subtotal line for the class above or have the it be added to the handling fee line. Which line should it be added to?', '6', '10', 'zen_cfg_select_option(array(\'Tax Subtotal\', \'Handling Fee\'), ', now())");
}
function remove()
{
global $db;
$keys = '';
$keys_array = $this->keys();
for ($i=0; $i<sizeof($keys_array); $i++) {
$keys .= "'" . $keys_array[$i] . "',";
}
$keys = substr($keys, 0, -1);
$db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
}
}
?>
-
Re: Rush/Priority Handling Charge
I am not seeing anything obvious ...
Could you post the language file for this?
Could you go to the Modules ... Order Total ... and click on this and post what you see in the right hand panel?
-
Re: Rush/Priority Handling Charge
That makes me feel better!
PHP Code:
define('MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TITLE', 'Express Handling');
define('MODULE_ORDER_TOTAL_EXPRESS_HANDLING_DESCRIPTION', 'Express Handling');
define('MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TEXT_DESCR', 'Rush my order! Select this optional handling by clicking on the box below next to Add Express Handling. A priority handling charge will be added to your total after you click continue.');
define('MODULE_ORDER_TOTAL_EXPRESS_HANDLING_TEXT_ENTER_CODE', 'Add Express Handling:');
-
Re: Rush/Priority Handling Charge
So far, it is working fine for me ...
Unless you post something weird for the settings in the right panel in the Modules ... Order Total ... for the module ot_express_handling or find any debug logs ... I am not seeing the problem ...
-
Re: Rush/Priority Handling Charge
Lesson to anyone reading - don't leave the sort order the same - must change one number. Duh. Thanks!
-
Re: Rush/Priority Handling Charge
Thanks for the update that this was an issue of the Sort Order ...
Duplicate Sort Orders on the modules will usually result in one of them disappearing ...
What version of Zen Cart are you running?
-
Re: Rush/Priority Handling Charge
1.5.1
One of the reasons why I missed that is because I have rarely ever have a problem - I guess until 1.5.1 - but the last time it came up there was a message in admin about duplicate sorts orders - that was for either payments or shipping - not order totals.
-
Re: Rush/Priority Handling Charge
I'm using this https://www.zen-cart.com/downloads.php?do=file&id=236 Priority Order Handling add on,
It seems like it stores in orders_total as ot_priorityhandling
Is there any way to have it combined with ot_shipping?
-
Re: Rush/Priority Handling Charge
First, some clarification... The Priority Handling module works by adding a new class to Zen Cart, called "ot_priority_handling", which encapsulates the processing or code portion that makes the module work. But the class itself does not store anything. The handling the handling charge itself and any preferences are stored in the ZenCart configuration table in MySQL. During a live cart session, whether the user selects this option or not is stored in the $_SESSION variable. Outside of this, the class then uses $_SESSION to see whether to do any processing; if so, then it uses the stored preferences to come up with a value to charge, does the tax calculation appropriately, and finally whatever else so everything shows up correctly in the final order total.
I supposed you could modify the built-in shipping module to accomplish something similar. I'm not sure why this would be preferable. If you want to add a flat-rate shipping charge base, just define your shipping preferences this way. The additional charge would be there, but it would be hidden. If you want to call out the charge specifically and give the user the option to add it or not, then you can use something like Priority Handling, and maybe just modify the language file so the text description is what you want. Therefore, I do not see any semantic reason for modifying the built-in shipping module code, but maybe I don't understand your specific application.
Another thing to consider is that modifying the built-in shipping module changes a component of the base distribution. The main idea with the Priority Handling module is to make the functionality an add-on that does not alter the distribution code base. Therefore, any Zen Cart update would be much easier for you using this module versus you trying to re-apply whatever code changes you did before on the base distribution.
Hope this helps. Good Luck!
-ml
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
mlankeit
First, some clarification... The Priority Handling module works by adding a new class to Zen Cart, called "ot_priority_handling", which encapsulates the processing or code portion that makes the module work. But the class itself does not store anything. The handling the handling charge itself and any preferences are stored in the ZenCart configuration table in MySQL. During a live cart session, whether the user selects this option or not is stored in the $_SESSION variable. Outside of this, the class then uses $_SESSION to see whether to do any processing; if so, then it uses the stored preferences to come up with a value to charge, does the tax calculation appropriately, and finally whatever else so everything shows up correctly in the final order total.
I supposed you could modify the built-in shipping module to accomplish something similar. I'm not sure why this would be preferable. If you want to add a flat-rate shipping charge base, just define your shipping preferences this way. The additional charge would be there, but it would be hidden. If you want to call out the charge specifically and give the user the option to add it or not, then you can use something like Priority Handling, and maybe just modify the language file so the text description is what you want. Therefore, I do not see any semantic reason for modifying the built-in shipping module code, but maybe I don't understand your specific application.
Another thing to consider is that modifying the built-in shipping module changes a component of the base distribution. The main idea with the Priority Handling module is to make the functionality an add-on that does not alter the distribution code base. Therefore, any Zen Cart update would be much easier for you using this module versus you trying to re-apply whatever code changes you did before on the base distribution.
Hope this helps. Good Luck!
-ml
Thanks!
-
Re: Rush/Priority Handling Charge
As identified by this post in the One-Page Checkout's support thread, there's an interoperability issue between the Priority Handling total and OPC. I've created a GitHub repository for the order-total and have provided (so far) this beta version: https://github.com/lat9/priority_han...g/v1.3.0-beta2
Once validated, I'll be submitting v1.3.0 of Priority Handling to the Zen Cart plugins for review.
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
lat9
As identified by
this post in the
One-Page Checkout's support thread, there's an interoperability issue between the
Priority Handling total and OPC. I've created a GitHub repository for the order-total and have provided (so far) this beta version:
https://github.com/lat9/priority_han...g/v1.3.0-beta2
Once validated, I'll be submitting v1.3.0 of
Priority Handling to the Zen Cart plugins for review.
I've just submitted to the plugins for review. For those wanting a preview, you can download from the plugin's GitHub repository: https://github.com/lat9/priority_han...ses/tag/v1.3.0
-
Re: Rush/Priority Handling Charge
Quote:
Originally Posted by
lat9
It's now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=236
-
Re: Rush/Priority Handling Charge
v2.0.0 of Priority Order Handling is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=236
This release updates the order-total for continued operation under Zen Cart v2.1.0+, Edit Orders 5.0.0+ and PHP 8.0+.