VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: melsonmarketing on January 03, 2020, 12:36:35 PM

Title: Hide ordertotal on view "order done"
Post by: melsonmarketing on January 03, 2020, 12:36:35 PM
Hi all!

a customer is using VM 3.6.10 to handle inquiries for spareparts.

as these are sent around the world and the price varies depending on the state (new, used...) of the parts, no prices shall be shown. The stock will be synched with/by Orgamax.

It was absolutely no problem to adjust the languagefiles by override and to hide the prices in the cart, ordermails and order-detailsview.

But there is one view I can't find out how to hide the sum:

The "Orde done" after submitting the cart (here: inquiry).

I can't find any info within the orderdone.php or order_done.php.

Tried with css:

div.post_payment_order_total {
  display: none !important;
}

Unfortunately doesn't work.

Can you point me to the right file or help with a working solution?

Thanks in advance

Michael
Title: Re: Hide ordertotal on view "order done"
Post by: Jörgen on January 03, 2020, 13:08:43 PM
IF THE CSS is correct then you have put THE Rule in THE wrong File. It has to be loaded last.
Any live url ?
Title: Re: Hide ordertotal on view "order done"
Post by: melsonmarketing on January 03, 2020, 13:27:18 PM
Hello Jörgen,

I took the inspected class which I can't find within the vm css files.

So I've put it into the custom.css of my template which also is the template within the VM config.

Sorry, no Live URL yet.
Title: Re: Hide ordertotal on view "order done"
Post by: melsonmarketing on January 03, 2020, 14:00:48 PM
Update

Seems, that this effect was related to caching.

I cleared all browser- and sitecaches befor i posted here, but obviously the servercache caused this behaviour.

It's okay now and the css is working.

Thank you
Title: Re: Hide ordertotal on view "order done"
Post by: melsonmarketing on January 03, 2020, 15:05:52 PM
Update #2

It worked exactly 2 times for testing:

english, german

Now the price shows up again.

Does anyone have an idea which file to edit to hide / delete the line with the price?
Title: Re: Hide ordertotal on view "order done"
Post by: GJC Web Design on January 03, 2020, 20:14:25 PM
it is sent in the returned $html from the payment plugin normally

e.g. 'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display'],

$html = $this->renderByLayout('post_payment', array(
'order_number' =>$order['details']['BT']->order_number,
'order_pass' =>$order['details']['BT']->order_pass,
'payment_name' => $dbValues['payment_name'],
'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display'],
'orderlink' =>$orderlink
));
Title: Re: Hide ordertotal on view "order done"
Post by: melsonmarketing on January 06, 2020, 11:54:07 AM
Thank you - exactly the information I needed.

I commented line 215 and 216 in standard.php an now it works as it should.

Thanks again and have a nice week!