Jump to content

[Resolved] Values Missing From Confirmation Email


wbs1969

Recommended Posts

Welcome wbs1969! Glad to see you made it to the forums.

The $x.xx is what CubeCart shows for prices when the admin has set the store to "Hide prices until logged in".

However, there was a bug (which was fixed, if I recall) that caused this masking to apply to the emails when the email was sent out.

Please confirm the exact version of CubeCart you are using: admin, Dashboard, Store Info tab.

Link to comment
Share on other sites

In analyzing this, I have to ask: How does a customer place an order when prices are hidden?

(If this a case where the admin is administratively moving an order from Pending to Processing, the masking of prices would not happen.)

I have found the programming logic error, but how CubeCart gets into this situation is not clear.

Could it be that the customer logged out fast enough so that CubeCart switched from having this customer logged in to not having this customer logged in before CubeCart had a chance to move the order to Processing? I can see that happening if the customer comes back from paying by PayPal (for example), quickly logs out, and then PayPal sends the IPN to CubeCart which moves the order to Processing.

Actually, the IPN call has its own CubeCart session, so this may not have anything to do with whether the customer is logged in.

More shortly.

Link to comment
Share on other sites

The prices are only hidden until they log in.

With my test, I went to the website.

The prices are $x.xx 

I create an account and log in and I can see prices.

SO I did a test purchase and everything worked as it should, but the confirmation email that I receive on the backend and the customer receives did not have any prices, just $x.xx
I would imagine most businesses would want a detailed receipt for book keeping LOL!

I actually just had my first real order come through (same problem).

I guess I wanted to see if it was as easy as flipping a switch to fix. If not,  I can turn the prices back on so its not hidden. Not a BIG deal, I would just prefer it to work like it should.

Link to comment
Share on other sites

If you are comfortable with making edits to the code, please do this:

In /classes/order.class.php, near line 204, find:
	public function getOrderDetails($order_id) {

		$order_summary = $this->getSummary($order_id);

Add on the blank line that follows:
$hide_prices = $GLOBALS['session']->has('hide_prices') ? $GLOBALS['session']->get('hide_prices') : false; $GLOBALS['session']->set('hide_prices', false);

About 70 lines later, find:
		foreach ($GLOBALS['hooks']->load('class.order.get_order_details') as $hook) include $hook;

		$this->_email_details    = $values;
		return $this->_email_details;

Change to:
		foreach ($GLOBALS['hooks']->load('class.order.get_order_details') as $hook) include $hook;
$GLOBALS['session']->set('hide_prices', $hide_prices);
		$this->_email_details    = $values;
		return $this->_email_details;

Please test.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...