VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: gba on June 09, 2017, 01:52:47 AM

Title: [SOLVED] How to choose an own layout for online order view?
Post by: gba on June 09, 2017, 01:52:47 AM
Hi all!

In VM config there are settings for layouts for cart, category, products and product detail.
I am wondering, how I could choose layouts for other views, like order or invoice?

Thank you very much for any useful hint!

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: Studio 42 on June 09, 2017, 17:16:44 PM
You have only one layout for order and invoice.
If you need to customize it, then you have to override file in your template and modify it.
Title: Re: How to choose an own layout for online order view?
Post by: gba on June 09, 2017, 19:05:03 PM
Hi!

This is what I feared...

@admin: Could you, please, move this thread to 'Virtuemart Development and bug reports' as a feature request?
Thank you!

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: K&K media production on June 09, 2017, 20:35:31 PM
Why more than one layout?

Where is the difference if you use a default.php override as your own layout or a whatever.php file?
Title: Re: How to choose an own layout for online order view?
Post by: gba on June 10, 2017, 23:14:00 PM
This is quite simple to answer:
I am using a VM template.
I want to do some customization on the template.
I want to be install future updates of the template.
And I do not want the updates to overwrite my customizations.

My question to you:
Why more than one layouts for cart, category, ...?  ;)

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: jenkinhill on June 10, 2017, 23:36:04 PM
As I have stated elsewhere, you can make your template edits and and simply save them locally & replace by ftp if ever needed.

There are a few order/invoice extensions to provide personalized invoicing if required:
https://www.olympianthemes.com/extensions/virtuemart-html-order-emails.html
http://extensions.virtuemart.net/product/products/advanced-virtuemart-invoices-detail
https://extensions.joomla.org/extension/invoice-management-advance-for-virtuemart/
https://www.artio.net/virtuemart-tools/vm-invoice-generator
Title: Re: How to choose an own layout for online order view?
Post by: gba on June 27, 2017, 16:53:55 PM
Hi!

Thank you for that links.

To clarify:
I am not talking about overrides for invoices or e-mails.
I am talking about overriding the online order view.
It would be great to have an additional layout choice in VM config for that.
Therefore I asked to move this thread to 'Virtuemart Development and bug reports' as a feature request - thank you!

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: Studio 42 on June 27, 2017, 17:23:33 PM
You can check values and and load own file.
Quote from: gba on June 10, 2017, 23:14:00 PM

My question to you:
Why more than one layouts for cart, category, ...?  ;)

You have multiple layouts , because you have multiple categories, product and most of views.
Cart and order has only 1 view, because you have only 1 cart. If you need to change this by context, then check the values and write own custom code for each case.
Title: Re: How to choose an own layout for online order view?
Post by: gba on July 06, 2017, 07:41:32 AM
Hi Studio 42!

Thank you for your comment.
It answers just part of my question, maybe not even the core  ;)

As I wrote above, I can choose the layout file for i. e. the cart - what is a great VM feature.
The same I needed for online order view.
Therefore I am still pleading to move this thread to VM feature requests (I think this is 'VirtueMart 2 + 3 » Virtuemart Development and bug reports', right?).
Thank you!

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: Studio 42 on July 17, 2017, 10:40:34 AM
Quote from: gba on July 06, 2017, 07:41:32 AM
Hi Studio 42!

Thank you for your comment.
It answers just part of my question, maybe not even the core  ;)

As I wrote above, I can choose the layout file for i. e. the cart - what is a great VM feature.
The same I needed for online order view.
Therefore I am still pleading to move this thread to VM feature requests (I think this is 'VirtueMart 2 + 3 » Virtuemart Development and bug reports', right?).
Thank you!

Kind regards,
Gerald

You can try, or become a member http://extensions.virtuemart.net/english/certifications/virtuemart-supporter-membership-bronze-detail so perhaps Max add it ?
But in real , you have only to know the context (any value in the link or session value) and call 2 different files to render different order view layout for eg.
Title: Re: How to choose an own layout for online order view?
Post by: Milbo on July 27, 2017, 21:00:25 PM
You all dont get his idea. I already explained it some time ago.

It makes sense to select a "productdetail layout" for the product details view. For example call it "mine". In case you update your Template, you can at least switch to the other layout. This works also the other way. I suggest templaters to NOT override the default layouts. It is better to add own layouts. So if there is a problem with the template, users can easily switch back to the default.
Title: Start new topic
Post by: deepakbasnal29 on July 28, 2017, 08:25:44 AM
Hi,

Can anyone please tell me from where i can start a new topic in forum. I am not able to find any option.

Thanks
Title: Re: How to choose an own layout for online order view?
Post by: gba on September 26, 2017, 14:23:49 PM
Hi VM team!

Thank you for adding hidden configs 'layout_order_detail' and 'layout_order_list'.
In http://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html these settings are not listed, yet.
Where can I find some documentation for these settings?

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: Studio 42 on September 26, 2017, 18:07:51 PM
Quote from: gba on September 26, 2017, 14:23:49 PM
Hi VM team!

Thank you for adding hidden configs 'layout_order_detail' and 'layout_order_list'.
In http://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html these settings are not listed, yet.
Where can I find some documentation for these settings?

Kind regards,
Gerald

It's not because one exist that it's already active or are used a day.
It's only to simplify developper work when it's used in many place.
In your case
QuoteYou have only to know the context (any value in the link or session value) and call 2 different files to render different order view layout for eg.
Using a config parameter or not in all case you have to write the new code. Only how you switch can be configured(perhaps) a day by the team in the core.
I really don't understand why you want all a setting because you have to write some code in any case or the team have to add a second layout in the core specific for each shop.
Title: Re: How to choose an own layout for online order view?
Post by: gba on September 26, 2017, 18:31:06 PM
Hi!

Thank you for your reply.
Actually I am afraid, I do not understand how your answer is connected with my question:
QuoteWhere can I find some documentation for these settings?

The new hidden config settings were published during one of the last VM releases.
I just do not know, how to use these settings in virtuemart.cfg.
Therefore I am asking for help  ;)
Anything else already has been discussed extensively in this thread.

So - any hint on how to make use of the new config settings 'layout_order_detail' and 'layout_order_list' is very much appreciated.

Kind regards,
Gerald
Title: Re: How to choose an own layout for online order view?
Post by: Studio 42 on September 27, 2017, 12:13:09 PM
write the value in the virtuemart.cfg file, go to config and save.
see JOOMLAROOT\administrator\components\com_virtuemart\virtuemart.cfg
Afer you can use this value in your code
VmConfig::get ('layout_order_detail', 'default'));
But this don't solve your problem
Title: Re: How to choose an own layout for online order view?
Post by: Milbo on September 28, 2017, 09:55:45 AM
Quote from: gba on September 26, 2017, 18:31:06 PM
Hi!

Thank you for your reply.
Actually I am afraid, I do not understand how your answer is connected with my question:

I dont understand it either. I just noticed there is a small error with the hidden config layout_order_list. It becomes active, when the user is logged in. Yeh I missed one bracke } sorry.
Title: Re: How to choose an own layout for online order view?
Post by: gba on September 28, 2017, 10:14:33 AM
Hi!

Quotego to config and save
... this was the key for me!

To put all your hints together (including a message from Max):
1. In virtuemart.cfg add i.e. layout_order_list=mylist, save file.
2. Open VM configuration in backend, do not change anything, save settings.
3. The file /templates/mytemplate/html/com_virtuemart/orders/mylist.php is loaded - enjoy your own order list layout!
(do the same with layout_order_detail)

@ template creators: Please make use of this new VM feature to make life easier for your users  ;)

Thank you guys!