Author Topic: [Solved] No price in emails  (Read 9559 times)

arnask

  • Beginner
  • *
  • Posts: 30
[Solved] No price in emails
« on: November 09, 2011, 14:26:20 pm »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: No price in emails
« Reply #1 on: November 09, 2011, 15:42:18 pm »
Hi,

Please, which payment method?

txs.

arnask

  • Beginner
  • *
  • Posts: 30
Re: No price in emails
« Reply #2 on: November 09, 2011, 15:50:22 pm »
Hi,

Please, which payment method?

txs.
standard

zzsser

  • Beginner
  • *
  • Posts: 37
  • I love virtuemart but I dislike bugs :-(
Re: No price in emails
« Reply #3 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.

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: No price in emails
« Reply #4 on: November 10, 2011, 08:47:07 am »
Hi,

txs for reporting. i will have a look.

zzsser

  • Beginner
  • *
  • Posts: 37
  • I love virtuemart but I dislike bugs :-(
Re: No price in emails
« Reply #5 on: November 12, 2011, 22:45:03 pm »
Merci d'avance  ;)

kpg

  • Beginner
  • *
  • Posts: 32
    • konzeptplus
Re: No price in emails
« Reply #6 on: November 12, 2011, 23:53:49 pm »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: No price in emails
« Reply #7 on: November 13, 2011, 10:04:59 am »
Hi,

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

kpg

  • Beginner
  • *
  • Posts: 32
    • konzeptplus
Re: No price in emails
« Reply #8 on: November 14, 2011, 10:54:06 am »
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

  • Beginner
  • *
  • Posts: 1
Re: No price in emails
« Reply #9 on: November 15, 2011, 11:33:30 am »
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

  • Beginner
  • *
  • Posts: 2
Re: No price in emails
« Reply #10 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

Gyuri

  • Beginner
  • *
  • Posts: 2
Re: No price in emails
« Reply #11 on: November 17, 2011, 07:10:02 am »
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

  • Beginner
  • *
  • Posts: 6
Re: No price in emails
« Reply #12 on: November 17, 2011, 21:35:44 pm »
Fast fix works for me :). THX a lot Gyuri !

Patrick

  • Beginner
  • *
  • Posts: 48
Re: No price in emails
« Reply #13 on: November 18, 2011, 18:51:14 pm »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: No price in emails
« Reply #14 on: November 20, 2011, 18:28:47 pm »
Hi,

Quote
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.
Ths fix has been added already:)