Any Flexicharges appear in the store as a zero amount, it looks like the value is not getting stored correctly/at all in the transaction

Comments

deadmalc’s picture

Component: flexicharge » stores

It looks like this may be the store module that isn't saving any of the misc field values?

sime’s picture

Assigned: Unassigned » sime

fixing this now.

sime’s picture

Status: Active » Fixed
deadmalc’s picture

Status: Fixed » Active

The flexicharge is being added to the store correctly if it is a flat value, however if it is a percentage e.g. 17.5%
It shows up as 17.50 units of currency, rather than the percentage value e.g.

Items ordered
Quantity Item Price
1 Day Moisturiser with Natural Environmental Protection
£19.00
Shipping: £0.00
V.A.T.: £17.50
Flat Rate Shipping: £3.99
Total: £40.49

sime’s picture

Status: Active » Fixed

Ah, my fix was a bit dramatic. I think I'm adding the charge to the transaction correctly now.
http://drupal.org/cvs?commit=44536

Give it another go.

deadmalc’s picture

That just foobars the misc fields completely....

deadmalc’s picture

If your just adding:
$txn->misc[$key]->price = $amount;

What is $key??? it isn't defined anywhere in the function that I can see

sime’s picture

eck. fixed now I hope. Please confirm

deadmalc’s picture

Status: Fixed » Active

Items ordered
Quantity Item Price
1 Day Moisturiser with Natural Environmental Protection
£19.00
: £3.99 <---- This is the "Flat Rate Shipping" looks like it has been inserted at the beginning of misc rather than in the correct place.
Shipping: £0.00
V.A.T.: £0.00
Flat Rate Shipping: £0.00
Total: £22.99

deadmalc’s picture

Items ordered
Quantity Item Price
1 Day Moisturiser with Natural Environmental Protection
£19.00
: £3.99
Shipping: £0.00
V.A.T.: £0.00
Flat Rate Shipping: £0.00
Total: £22.99

previous post got corrupted due to use of dodgy text :-(

sime’s picture

I am not doing this justice obviously. I'll have to look at this more closely ASAP

deadmalc’s picture

Looks like I managed to post after your last fix!
It works like a charm! (K)
Thanks very much!!

deadmalc’s picture

Status: Active » Fixed

I suppose I should close this then ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)