Change Order Totals block in Admin > Sales > Order > View - magento-1.5

I'm trying to edit the order totals temporarily on the fly.
See screenshot of what I'm trying to edit.
I have looked at the events, but none I could find that wouldn't affect the rest of the sites, nor could I find the page that handles this.
Any help with this?
(source: ctrlv.in)

The easiest way to identify the page that handles this is turn on the template hints for the admin area by executing the following query against the magento db
INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/debug/template_hints', 1), ('default', 0, 'dev/debug/template_hints_blocks', 1);
You'll then be able to determine the relevant template to override.
In this case it's /adminhtml/default/default/template/sales/order/totals.phtml
You can turn off the template hints by running
UPDATE core_config_data SET value = 0 WHERE path like 'dev/debug/template_hints%';

Related

Is there a way to display new column in Orders html table in Kentico without touching the code?

I'm using Kentico MVC v12 with a fresh installation of DancingGoat(MVC) template.
I've modified the "E-commerce" module by adding a new column in the "Order" table.
I would like to be able to see it on the "Order" module in the list page.
I see in the "User interface" tab that it uses an "aspx" page.
In it I see that it calls an "ascx" page that uses a "UniGrid" component and specify the columns directly in a data attribute.
I don't like the idea to modify this file to display my new column because I see this website as the foundation of my next features, I would like to avoid as much as possible to touch the code of the website template, do you know if there is an other way ?
Maybe I'm missing a configuration somewhere else ?
Thank you by advance !
Update 06-03-2019:
I tried the solution of Peter Mogilnitski but it doesn't work :x
I added the column in the data source
Then I checked the column in widget configuration
Nothing is displayed
I debugged the sql query, I don't see my column in the query, is there an other configuration to do somewhere else ?
Update 08-03-2019:
The support of Kentico confirmed that the solution I proposed that was confirmed by #Rui was the right way to do it.
Thank you everyone !
If you want the custom field to appear in the UI, you will have to make change to the ascx page. You will need to make a note to that because you will likely need to update it during upgrade or hotfix (less likely)
Other than adding the data field to Columns, you will also need to add ug:column to the section
<ug:Column Name="SAPID" Source="SAPID" Caption="SAPID" Sort="SAPID" />
Yes. There is. This is the widget called orders:
You need to go to widgets, select orders widget and add your column to visible columns
Now go to store overview:
Click on properties of latest orders (this is orders widget used all over the store) and scroll down to column and make your column checked.

Search thread using by created and assigned username in Forum section Orchard CMS

Please check the attached images. I want to search the thread using by created username and assigned username. But i am getting the result only when I search using by assigned username. When i use the created username i am not getting the result.
Please help to resolve this issue. It is not happen in an Orchardpros.net site.
How can i do Orchardpros.net - 'My Tickets' concept. This is the one for my requirement.
enter image description here
enter image description here
You need to go to you admin panel then do this:
Settings > Search
Select the index you're working with
Tick the checkbox next to author
Click Save
Either wait a few minutes for the index to update itself or then go to:
Settings > Indexes
Find the index you're working with
Press rebuild
After that it should be included in your search results.

How can I crawl but not index web pages in OpenSearchServer?

I'm using OpenSearchServer to provide search functionality on a web site. I want to crawl all pages on the site for links to follow but I want to exclude some pages from the index. I can't work out how to do this.
Specifically the website includes a shop that has its own product search and I am keeping this search for products and categories. The product pages have URLs like http://www.thesite/p/123 so I don't want to include any page like this in the search results. However some product pages reference background info pages and I want these to be included in the search index.
The problem I have is that the filter has no effect on the results - it doesn't filter out the /p/ and /c/ results. If I change the filter by unticking the negative box I get no results so it seems to be either the contents of the field or the filter criteria that is causing the problem.
I've tried adding a negative filter to the default query called search in the Query > Filter tab on the index with url:"http://www.thesite/p/*"
but it seems that wildcards are not supported for query filters although they are supported for Crawler > Exclusion list filters.
I've tried adding a new field called urlField in Schema > Fields and populating it using an analyzer configured using the Whitespace Tokenizer and a regular expression (http://www.thesite/(c|p)/). When I use the Test button it seems to generate two tokens for my test URL http://www.thesite/p/123:
http://www.thesite/p/
p
I'd hoped to be able to use the first one in a Query > Filter to exclude all the shop results and optionally be able to use the p (for product) or c (for category) if I need to search the product pages sometime in the future.
The urlShop field in the schema is set up as follows:
Indexed: yes
Stored: no (because I don't need the field back, just want to be able to filter on it)
TermVector: No
Analyzer: urlShop
Copy of: url
I've added urlFilter:"http://www.thesite/p/" to Query > Filters with the negative box ticked.
This seems to have no effect on the results when I use the default renderer.
To see whether it affects the returned results I unticked the negative box in the query filter I get no results in the default renderer. This leads me to believe that the urlShop field is not being populated but I'm not sure how to check this directly.
I would like to know whether there is an easier way to do this but if my approach makes sense in the context of OpenSearchServer please can you help me identify what's wrong?
The website is running under IIS and OpenSearchServer will be configured on the same server running in Tomcat.
Finally figured this out...
Go to query and hit edit for your configured query. Then go to the filters tab. Add a query filter like this:
urlExact:"http://myurltoexclude*"
Check the "negative" box. Click add.
Now make sure to click "save in the tiny little button on the right hand side. This is the part I missed. The URLS are still in the DB and crawl, but at least they aren't returned in results.

get document by id in modx

Very simply I want to have multiple content regions on a single page. Note this is my first Modx site.
So far I have the home page and created child documents for the sub regions on the home page. All I want is to call them in the template.
For example there is a document with an id of 2, and I want the long title on the home page (id of 1).
Something like :
[[~2*longtitle]]
Unfortunately the above just returns the url to that sub document and not the longtitle of that document itself.
So far I've found no documentation on doing so. Does anyone know how to accomplish this?
You have 2 options, the hard way ~ the route you have chosen ;) and the easy way... which I will outline as well.
For what you are trying to do you are going to want to use either getResources http://rtfm.modx.com/display/ADDON/getResources which will allow you to loop over a collection of resources & extract the fields you need [in this case 'content'] or getresourceField http://rtfm.modx.com/display/ADDON/getResourceField which will allow you to specify a single resource & the field to extract, just call it multiple times in your template.
You might try:
[[getResources? &parents='[[*id]]' &tpl='myTpl' &includeContent='1']]
Should get all the child resources [up to default ~ 10] of the current resource, then you would create a template for get resources to loop over:
<h1>[[+longtitle]]</h1>
<p>[[+content]]</p>
notice the use of + instead of * for the resource fields
OR
the easy way, create template variables for your extra content areas, you can set them up as rich text areas as well. that way all your content for any given page is within the one resource ~ no need for you to create child resources to hold content for your header/footer/sidebar/etc
Either way will work, the TV method may use less overhead though.
you can use fastfield
[[#12.pagetitle]]
or in a call
[[#[[+id]].pagetitle]]
You can also grab all TVs of that resource, like
[[#12.myTv]]
see also: http://rtfm.modx.com/extras/revo/fastfield

Account Advanced Find View has Duplicate Filter

If I create a new Account Advanced find view I am finding some very odd behaviour.
I follow these steps:
Create new view for Account
Go to Criteria
Criteria has been prepopulated as below
Which is odd on its own - why prepopulate?
Anyway, if I then add something, say Status = Active , it duplicates the first criteria as below:
Other than 'your server is FUBAR'd' - anyone have any ideas what could be causing it?
edit: if I export, the XML does not show the duplicated filters as below shows:
Reply received from Microsoft. A colleague has verified this and found it fixed the issue in our case.
A filter had been applied to the default view for Account (I must admit I wasn't aware of this!).
When you click to create a new view, part of the code executed retrieves the current default view and uses that as a template.
Removing all filters on the default view therefore solve this issue.
I'm not quite sure why it should have had the affect it did when adding new criteria, but I think I'll choose not to think about that!

Resources