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

mansonul

  • Beginner
  • *
  • Posts: 16
Re: [Solved] No price in emails
« Reply #15 on: November 24, 2011, 09:05:46 am »
PLEASE, make it idiot proof...

I don`t understand wich code (from where to where) to move...

L.E.: I did commented out "$this->emptyCart();" and worked like charm!!!

Patrick

  • Beginner
  • *
  • Posts: 48
Re: [Solved] No price in emails
« Reply #16 on: November 24, 2011, 09:13:54 am »
In the file search for -->  $this->emptyCart();

It should be after the lines

foreach ($returnValues as $returnValue) {
            if ($returnValue !== null  ) {
               if ($returnValue == 1 )   {
remove this  ------>           $this->emptyCart();

Second one should be after ---->
$this->sentOrderConfirmedEmail($order->getOrder($orderID));
                  //We delete the old stuff

If it isn't copy it after, what to copy ---> $this->emptyCart();


If this isn't idiot proof enough?

Patrick


mansonul

  • Beginner
  • *
  • Posts: 16
Re: [Solved] No price in emails
« Reply #17 on: November 24, 2011, 09:19:53 am »
Proof enough....  ;D

kpg

  • Beginner
  • *
  • Posts: 32
    • konzeptplus
Re: [Solved] No price in emails
« Reply #18 on: November 24, 2011, 18:56:26 pm »
@Patrick,

Thanks for your help. I almost forgot to thank you.

Regards

magicf

  • Beginner
  • *
  • Posts: 11
Re: No price in emails
« Reply #19 on: December 09, 2011, 23:42:00 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

I use 1.9.8RC2M and this fix works for me. THANK YOU!!