Dirty Butter Posted September 5, 2012 Share Posted September 5, 2012 I've added this to my bug report about the Lookup Order function, but thought I'd see if anyone here has any ideas about what's wrong. When the customer does the lookup, but does NOT login first, the item price shows as zero and the state shows as the ISO code number, rather than the word. Any ideas how to fix this??? Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 5, 2012 Share Posted September 5, 2012 In the file cubecart.class.php, at around line 1956, we are in a section of a logged-in customer's view order code. We see that 'state', 'country', 'state_d', and 'country_d' are processed. Moving down to about line 2079, we are in a section of a non-logged-in customer's view order code that more or less duplicates the above. We see that only 'country' and 'country_d' is processed. To fix this, add above the statements $order['country'] and $order['country_d'], these two lines: $order['state'] = getStateFormat($order['state']); $order['state_d'] = is_numeric($order['state_d']) ? getStateFormat($order['state_d']) : $order['state_d']; In the image of the non-kurouoto skin, I'm concerned that the state is number 441 and the kurouto skin the state is number 1. State Id 1 is Alabama, but 441 is Avon UK. I haven't found a reason for the zero price but double check that record in the database to make a sure a price was entered. Or maybe it is easiest to review these orders in the admin side. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 5, 2012 Share Posted September 5, 2012 As for the price, I see that you have a modified skin and a commercial skin. Please try an unmodified bona fide stock CubeCart skin. I am concerned that there may have been a change to the skin code that affects the display of line items of which change was not properly applied to your modified and custom skins. But then you hint that a logged-in customer sees the line item's total price. Well then.................. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 5, 2012 Share Posted September 5, 2012 Ok, I found a likely suspect, but haven't fully explored it. Lines 2063 and 2064, flip the order. That is, make: $item['price'] = $GLOBALS['tax']->priceFormat($item['price']); $item['price_total'] = $GLOBALS['tax']->priceFormat(($item['price'] * $item['quantity']), true); look like: $item['price_total'] = $GLOBALS['tax']->priceFormat(($item['price'] * $item['quantity']), true); $item['price'] = $GLOBALS['tax']->priceFormat($item['price']); The first line formats $price before it is used by 'price_total'. That may be the problem, but there is other code that unformats the price if needed. (So many band-aids. ) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 5, 2012 Author Share Posted September 5, 2012 Don't worry about the weird number on the one screenshot. I think I had a fake UK address and fiddled with it before making the screenshot. I'll double check, but I don't think that's significant. Will try your fixes and see what happens. Thanks! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 5, 2012 Author Share Posted September 5, 2012 default kurouto skin AND commercial skin blueprint both worked perfectly! Could you add the solution to the Lookup Order bug ticket 0000299? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.