News:

Support the VirtueMart project and become a member

Main Menu

[Solved] No price in emails

Started by arnask, November 09, 2011, 14:26:20 PM

Previous topic - Next topic

arnask

If someone buys smth, puts it in cart and checks out. The mail is sent to admin and client. But in this mail there is no price, everywhere is zeros.
In backend everything looks fine.

P.S. 2.0.0-RC-2M

alatak

Hi,

Please, which payment method?

txs.

arnask


zzsser

Same issue and I use the standard payment too!

Since I updated version RC2K to version VM 2.0.0 RC2M, the total amount to pay in e-mail (order confirmation) is incorrect (no products and so prices empty). Only the shipping costs are displayed. All ordered products have disapeared. This is only in this e-mail. On the confirmation page, everything is correct.

alatak

Hi,

txs for reporting. i will have a look.

zzsser


kpg

#6
Quote from: zzsser on November 10, 2011, 00:31:21 AM
Same issue and I use the standard payment too!

Since I updated version RC2K to version VM 2.0.0 RC2M, the total amount to pay in e-mail (order confirmation) is incorrect (no products and so prices empty). Only the shipping costs are displayed. All ordered products have disapeared. This is only in this e-mail. On the confirmation page, everything is correct.


Hi,


If got the same Problem with the 1.9.8M Version. I use the html Mail and looked at the hints i get on that treat. http://forum.virtuemart.net/index.php?topic=82614.msg272453#msg272453
But i couldn't find a bug there. It should be the Plugin.

@alatak Thx for the work.

Tobi

alatak

Hi,

Yes i saw the problem :(
It has been corrected.
Quote@alatak Thx for the work.
txs :)

kpg

Cool! That is great news.

Could you tell me what the solution was? And can i integrate the fix allready in my version? Raw code will do.  That would be awsome :-)

Or will it be in the N-Version?

Thx

Tobi

LotusRouge

Hi,

As kpg I've got the same issue, and would desperately like to know what is the fix for this pb, if possible before the N-version ?

Thx

Fab

Gyuri

Hi, fast fix, working for me, is to move the emptycart function after the mail generation like this:

in \helpers\cart.php
in private function confirmedOrder() {

foreach ($returnValues as $returnValue) {
            if ($returnValue !== null  ) {
               if ($returnValue == 1 )   {
// FROM HERE -->
                  JRequest::setVar('html' , $html);
                   // send the email only if payment has been accepted
                  // update status?
                  if ($new_status) {
                      if (!class_exists('VirtueMartModelOrders'))
                     require( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );
                      $modelOrder = new VirtueMartModelOrders();
                      $orders[$orderID]['order_status'] = $new_status;
                      $orders[$orderID]['virtuemart_order_id'] = $orderID;
                      $orders[$orderID]['customer_notified'] = 0;
                      $orders[$orderID]['comments'] = '';
                      $modelOrder->updateOrderStatus($orders, $orderID); //   
                  }                  
/*mail sending */                   $this->sentOrderConfirmedEmail($order->getOrder($orderID));
                  //We delete the old stuff
/* MOVED HERE -->*/      $this->emptyCart();

Gyuri

Gyuri

Slow fix:

write this function, and convert order array into a cart, order data are here, but the mail content generation uses cart :(

   function prepareMailData(){

      if(empty($this->vendor)) $this->prepareVendor();
      //TODO add orders, for the orderId
      //TODO add registering userdata
      // In general we need for every mail the shopperdata (with group), the vendor data, shopperemail, shopperusername, and so on
   }

Gyuri

Robsone

Fast fix works for me :). THX a lot Gyuri !

Patrick

#13
Quote from: Gyuri on November 17, 2011, 07:06:26 AM
Hi, fast fix, working for me, is to move the emptycart function after the mail generation like this:

in \helpers\cart.php
in private function confirmedOrder() {

foreach ($returnValues as $returnValue) {
            if ($returnValue !== null  ) {
               if ($returnValue == 1 )   {
// FROM HERE -->
                  JRequest::setVar('html' , $html);
                   // send the email only if payment has been accepted
                  // update status?
                  if ($new_status) {
                      if (!class_exists('VirtueMartModelOrders'))
                     require( JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php' );
                      $modelOrder = new VirtueMartModelOrders();
                      $orders[$orderID]['order_status'] = $new_status;
                      $orders[$orderID]['virtuemart_order_id'] = $orderID;
                      $orders[$orderID]['customer_notified'] = 0;
                      $orders[$orderID]['comments'] = '';
                      $modelOrder->updateOrderStatus($orders, $orderID); //   
                  }                  
/*mail sending */                   $this->sentOrderConfirmedEmail($order->getOrder($orderID));
                  //We delete the old stuff
/* MOVED HERE -->*/      $this->emptyCart();

Gyuri

Thanks!!!!!

I only removed the first mentioned  "$this->emptyCart();"  the other one was allready in place where it should be.
I did a clean install J1.7 and VM2.0RC so RC ! @development remove the first one in the final release, that should fix it for multiple users.

Thanks Patrick





alatak

Hi,

QuoteI did a clean install J1.7 and VM2.0RC so RC ! @development remove the first one in the final release, that should fix it for multiple users.
Ths fix has been added already:)