How to get shipping address in new column of order list in xcart - x-cart

I am newbie in X Cart and working on XCart 5.2.5. I would like to know that how can I displays customer billing or shipping address in one new custom column of order list at back end.
Please see the attached screen shots below
Order list screenshot
Any kind of help will be appreciated.

You would need to decorate the \XLite\View\ItemsList\Model\Order\Admin\Search class and define a new column in the defineColumns() method.
The column definition should be something like this:
$columns['shipping_address'] = array(
static::COLUMN_NAME => 'Shipping address',
static::COLUMN_TEMPLATE => 'modules/Tony/OrderSearchChange/order/shipping_address/body.tpl',
static::COLUMN_ORDERBY => 350,
);
First field defines a title of the column, the second field defines a template that will be shown in the table's cell and the third one defines the position of the column (the higher the number the further to the left the column will be).
I have also created a sample module, so you could play with it:
https://dl.dropboxusercontent.com/u/23858825/Tony-OrderSearchChange-v5_2_0.tar
Tony

Related

How reference an IG's column name instead of an array's index?

I am using Oracle APEX 22.1.1.
I have 2 IG's. I am grabbing data from region 1 and inserting it into region 2. I am using "getSelectedRecords[index of the record][index of the column] to grab a specific value i.e a column named "PATIENT_NAME". There will be a problem when columns order changes. For example, the grid has PATIENT_ID which is the first column displayed to the user and PATIENT_NAME which is displayed after PATIENT_ID. If the user changes the order and displayed PATIENT_NAME before PATIENT_ID, the code will grab a wrong value. How to solve that? How to reference the name instead of the index number?
I remember there was an option "recordIsArray" that determines if the model should return an array or an object, but I can not find it anymore, and I do not know how to set it. Is that the way I should use or is there a better way?

Trying to replace data based on attributes from two other columns

I need to change the inventory category for a couple of account numbers and only for a couple of companies. The inventory category for these accounts are mapped based on the account number but need to be changed specifically just for two companies. I've tried to filter by the company number and then find/replace, which worked fine, but then I can't unfilter to bring back the rest of the companies. I can't change the category for just those account numbers because it is only different for just those two companies.
Lisa, Here's perhaps a simpler approach than where your current way is taking you.
If I begin with this table:
Then I add a column (Add Column -> Custom Column) with the following:
The formula uses an if statement to determine whether each row has a specific Account (Acct. 4) AND Company (Co. 8). If so, then 99 is returned as a new category value for that row of the new column. If not, then the original Inventory Category is returned as a value for that row of the new column. (Obviously, you would edit this formula accordingly, to support your account, company, and new inventory category values.)
Here's the result:
Then I could delete the original Inventory Category column and rename the remaining New Inventory Category column to Inventory Category.

UNIQUE formula in Google Sheets for multiple ranges

I have a list of participants in column A. A full employee list in column B. I want to get the list of non-participants in column C. Basically 'B-A' but in list form.
'January' is the participants list:
try:
=FILTER(A:A; NOT(COUNTIF(B:B; A:A)))
It is always an added challenge to write formulas when we don't have access to actual date. But based on what I can see, try this formula in the top cell of any empty column:
=ArrayFormula({"My Header"; FILTER(R2:R,ISERROR(VLOOKUP(TRIM(R2:R),TRIM(T2:T),1,FALSE)))})
You can change "My Header" to something meaningful.
The next part means "FILTER in anything in the range R2:R that cannot be found [i.e., ISERROR(VLOOKUP(...))] in T2:T."
TRIM is used just to account for any accidental/stray spaces that may occur in either list, since that would result in no match if one or the other had extra space.
If this does not do what you expect, please share a link to a sample spreadsheet.

Generate multiple or single cell values based on conditions?

Problem:
I have single products and bundled products. I have a single "product ID" column and I want the sheet to recognize both bundled products and single products and, where it is a bundle, to fill the product ID for that bundle.
Here is the layout:
I have a list of bundles and the relevant product information on a separate sheet.
Explanation:
In column A, I enter either the product name of the Bundle ID.
Problem:
Is it possible for column B to detect whether Column A refers to a Bundle or single product? It detects a bundle, then can it generate the items in for bundle?
For example in A4= " - BUNDLE001" so in column B will generate the relevant product ID: B4= "LG001", B5= "PAN002". But I also need column B to know if it did not Bundle and to display the relevant product ID.
Sheet Link: https://docs.google.com/spreadsheets/d/1wPNYKbtbkaZ2LDrFq2RO_f13cfQeGcWsyhwS5VDkuvk/edit?usp=sharing
if your A column will look like this:
then you can use this formula on every row you need:
=ARRAYFORMULA(IFERROR(IFERROR(QUERY(Sheet2!A:C, "select C where A = '"&
REGEXEXTRACT(INDIRECT("A"&ROW()), TEXTJOIN("|", 1, Sheet2!A$2:A))&"'", 0),
REGEXEXTRACT(INDIRECT("A"&ROW()), "- (.+)"))))

Spree make product in some order , like middle , top and bottom

I want product in some specific orders , so to achieve this it would be good if I add one column in product table with name position and order it accordingly or there are any other way to do it please help