Jump to content



Dan Cole

Member Since 07 Oct 2007
OFFLINE Last Active Today, 02:03
-----

Posts I've Made

In Topic: NEW! Complete Order Editing Tool!

Yesterday, 19:36

@milerwan Nice job Gwenn....works a treat....I added the changes you posted to the edit_orders_ajax.php file instead of to edit_orders.php as you did.   The only problem I had is that $tax wasn't defined in that file so I added these two lines....

 

$tax_class = 3;
$tax = tep_get_tax_rate($tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

 

just before the two instances of...

 

$tax_to_add += $ot_value * $tax / (100 + $tax);

 

in your code so they now look like...

 

$tax_class = 3;
$tax = tep_get_tax_rate($tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
$tax_to_add += $ot_value * $tax / (100 + $tax);

 

$tax_class = 3 is my Taxable class.

 

Well done! :thumbsup:

 

Dan


In Topic: NEW! Complete Order Editing Tool!

Yesterday, 15:03

@milerwan  Wow, you have this working already?  Thanks Gwenn.  I'll give it a go and see how it works out....I'd still love to know how to register a new order_total module though.   Any ideas on that?  I'm thinking that you should just be able to drop in the module and related language file in the appropriate directories and install it but that doesn't seem to work with the ot_discount_coupon module.  Anyone know if my thinking is correct?

 

Now that I think about this, I think I'll just rework one of the exiting modules, that I know works, and see if my thinking is sound but if anyone wants to chime in, I'd welcome the input.

 

Dan


In Topic: NEW! Complete Order Editing Tool!

Yesterday, 13:07

The "ot_discount" class is not taken into account by order_editor because all the parameters related to the coupon calculated from the catalog are not attached to the ot_shipping class itself :

 

Applies to:    Order Sub-Total    Shipping  Products:    Categories:    Manufacturers:

 

Normally it would require a different class depending parameter.

 

% or number, "Shipping" or "Order Sub-Total/Product/Categories/Manufacturer" option...

 

The registered class name from "orders_total" TABLE must be unique depending on the crossing of options.

 

A lot of this is still lost on me (my eyes glaze over when I start looking at classes) but I think you are correct in that the order_total class is not picking up or recognizing anything other than the ot_shipping, ot_total, ot_subtotal and ot_tax classes.   So I guess the question is....how do we change, add or register the coupon class so it is picked up in the order_totals_array?   Anyone have any ideas on this?

 

I guess the other option is to try and work around that and see if we can just determine what the tax is on the coupon (this is simple to do) and then try to simply deduct that from the ot_tax valve (haven't tried this yet).   The feels like a dirty hack so I would favor the first option if possible.

 

Dan


In Topic: Discount Code BS

Yesterday, 12:49

Which one do you use Dan?

 

I use Discount Coupon (I think that is the name) but I wouldn't switch just to see a message like that....maybe if you ask nicely @raiwa  Rainer or @Tsimi Lambros will add an error message rountine to a future update.  The discount coupon addon has other draw backs ie. it might not work with PayPal Express.

 

Dan


In Topic: Discount Code BS

Yesterday, 11:23

I was just testing and is this correct that if a customer enters an incorrect code and you press continue it will goto checkout confirmation without warning the customer they have entered an incorrect code?

 

I use a different coupon code addon but there should be an error message displayed at the top of the page via the message stack.   At least mine works that way.  If you don't see a message there...there likely isn't one.

 

Dan