Author Topic: Vendor Comments Not Saving Unless Order Status Changed  (Read 828 times)

Creepzn

  • Beginner
  • *
  • Posts: 20
  • Web design + graphics and IT sales
    • Webits
  • VirtueMart Version: 3.2.2
Vendor Comments Not Saving Unless Order Status Changed
« on: November 21, 2018, 11:40:15 am »
Hi there

Not sure if anyone has a solution for this, but when I try add comments on orders without changing the order status, the comments do not save. When changing the status of orders and simultaneously add a comment, the comments save.

I was able to add multiple comments without changing the status of orders to keep track of follow up calls etc.

Joomla version 3.9
VM Version 3.4
Affordable web design, banners, flyers and logos + IT sales https://webits.co.za

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2290
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #1 on: November 21, 2018, 11:45:59 am »
In order list view or single order view ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8960
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #2 on: November 21, 2018, 15:40:47 pm »
Yes .. if the status isn't changed the "update" does nothing

it fails the check in the orders model

public function updateOrderHistory($inputOrder)

if(empty($oldHistoryRow) or $oldHistoryRow->order_status_code!=$inputOrder['order_status_code'])

Code: [Select]
if(empty($oldHistoryRow) or $oldHistoryRow->order_status_code!=$inputOrder['order_status_code']){
$_orderHist = $this->getTable('order_histories');
$inputOrder['comments'] = nl2br($inputOrder['comments']); //would be cooler in the table check function
$_orderHist->bindChecknStore($inputOrder);
}

You could mark this as a feature request as some sort of case or switch here to just save comments without  status change might be useful

or hack and comment out the if

or set it to another status with the comment then put it back to the previous
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Creepzn

  • Beginner
  • *
  • Posts: 20
  • Web design + graphics and IT sales
    • Webits
  • VirtueMart Version: 3.2.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #3 on: November 22, 2018, 15:02:02 pm »
Thanks for your responses. This happens in both single and list order view.
Affordable web design, banners, flyers and logos + IT sales https://webits.co.za

Creepzn

  • Beginner
  • *
  • Posts: 20
  • Web design + graphics and IT sales
    • Webits
  • VirtueMart Version: 3.2.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #4 on: November 22, 2018, 15:04:45 pm »
The switching to another status is a temporary solution for now, but obviously not a great one at all. Will try comment out the "if", but where is that script?
Affordable web design, banners, flyers and logos + IT sales https://webits.co.za

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8960
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #5 on: November 22, 2018, 16:26:50 pm »
Quote
it fails the check in the orders model

public function updateOrderHistory($inputOrder)

if(empty($oldHistoryRow) or $oldHistoryRow->order_status_code!=$inputOrder['order_status_code'])


admin - vm - models - orders.php
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Creepzn

  • Beginner
  • *
  • Posts: 20
  • Web design + graphics and IT sales
    • Webits
  • VirtueMart Version: 3.2.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #6 on: November 23, 2018, 07:26:55 am »
Thank you

I tried commenting that out, but the function of the order comments remained the same
Affordable web design, banners, flyers and logos + IT sales https://webits.co.za

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8960
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #7 on: November 23, 2018, 10:15:20 am »
works for me

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

mohtashimj

  • Beginner
  • *
  • Posts: 17
  • A beginner
  • Skype Name: mohtashim.astecksoft
Re: Vendor Comments Not Saving Unless Order Status Changed
« Reply #8 on: July 08, 2019, 12:26:56 pm »
By commenting the if condition works for me.

Thank you!