Magento 1.9.x Order Email item not displaying randomly - magento-1.9

we have setup separate order email template for admin. For some orders it does not print order item section. Here is the code from default.phtml file responsible for item listing. It seems random so its hard to debug why its not loading for some orders.
/app/design/frontend/package/theme/template/email/order/items.phtml
echo $this->getItemHtml($_item)

Related

Mass Upload Files To Specific Contacts Salesforce

I need to upload some 2000 documents to specific users in salesforce. I have a csv file that has the Salesforce-assigned ContactID, as well as a direct path to the files on my desktop. Each contact's specific file url has been included in the csv. How can I upload them all at one and, especially, to the correct contact?
You indicated in the comments / chat that you want it as "Files".
The "Files" object is bit more complex than Attachments, you'll need to do it in 2-3 steps. What you see as a File (you might see it referred to in documentation as Chatter Files or Salesforce Content) is actually several tables. There's
ContentDocument which can be kind of a file header (title, description, language, tags, linkage to many other areas in SF - because it can be standalone, it can be uploaded to certain SF Content Library, it can be linked to Accounts, Contacts, $_GOD knows what else)
ContentVersion which is well, actual payload. Only most recent version is displayed out of the box but if you really want you can go back in time
and more
The crap part is that you can't insert ContentDocument directly (there's no create() call in the list of operations) .
Theory
So you'll need:
Insert ContentVersion (v1 will automatically create for you parent ContentDocuments... it does sound bit ass-backwards but it works). After this is done you'll have a bunch of standalone documents loaded but not linked to any Contacts
Learn the Ids of their parent ContentDocuments
Insert ContentDocumentLink records that will connect Contacts and their PDFs
Practice
This is my C:\stacktest folder. It contains some SF cheat sheet PDFs.
Here's my file for part 1 of the load
Title PathOnClient VersionData
"Lightning Components CheatSheet" "C:\stacktest\SF_LightningComponents_cheatsheet_web.pdf" "C:\stacktest\SF_LightningComponents_cheatsheet_web.pdf"
"Process Automation CheatSheet" "C:\stacktest\SF_Process_Automation_cheatsheet_web.pdf" "C:\stacktest\SF_Process_Automation_cheatsheet_web.pdf"
"Admin CheatSheet" "C:\stacktest\SF_S1-Admin_cheatsheet_web.pdf" "C:\stacktest\SF_S1-Admin_cheatsheet_web.pdf"
"S1 CheatSheet" "C:\stacktest\SF_S1-Developer_cheatsheet_web.pdf" "C:\stacktest\SF_S1-Developer_cheatsheet_web.pdf"
Fire Data Loader, select Insert, select showing all Salesforce objects. Find ContentVersion. Load should be straightforward (if you're hitting memory issues set batch size to something low, even 1 record at a time if really needed).
You'll get back a "success file", it's useless. We don't need the Ids of generated content versions, we need their parents... Fire "Export" in Data Loader, pick all objects again, pick ContentDocument. Use query similar to this:
Select Id, Title, FileType, FileExtension
FROM ContentDocument
WHERE CreatedDate = TODAY AND CreatedBy.FirstName = 'Ethan'
You should see something like this:
"ID","TITLE","FILETYPE","FILEEXTENSION"
"0690g0000048G2MAAU","Lightning Components CheatSheet","PDF","pdf"
"0690g0000048G2NAAU","Process Automation CheatSheet","PDF","pdf"
"0690g0000048G2OAAU","Admin CheatSheet","PDF","pdf"
"0690g0000048G2PAAU","S1 CheatSheet","PDF","pdf"
Use Excel and magic of VLOOKUP or other things like that to link them back by title to Contacts. You wrote you already have a file with Contact Ids and titles so there's hope... Create a file like that:
ContentDocumentId LinkedEntityId ShareType Visibility
0690g0000048G2MAAU 0037000000TWREI V InternalUsers
0690g0000048G2NAAU 0030g000027rQ3z V InternalUsers
0690g0000048G2OAAU 0030g000027rQ3a V InternalUsers
0690g0000048G2PAAU 0030g000027rPz4 V InternalUsers
1st column is the file Id, then contact Id, then some black magic you can read about & change if needed in ContentDocumentLink docs.
Load it as insert to (again, show all objects) ContentDocumentLink.
Woohoo! Beer time.
Your CSV should contain following fields :
- ParentID = Id of object you want to link the attachment to (the ID of the contact)
- Name = name of the file
- ContentType = extension(.xls or .pdf or ...)
- OwnerId = if empty I believe it takes your user as owner
- body = the location on your machine of the file (for instance: C:\SFDC\Files\test.pdf
Use this csv to insert the records (via data loader) into the Attachment object.
You will then see for each contact, that records have been added to the 'Notes & Attachments' related list.

Need to identify dynamic text value in selenium python

I am new to selenium webdriver python . I need to automate back end process of an e-commerce application ( order processing)
here the orders are classified to three types :
say A-type , B-type and C-type .
After successful order completion the orders will listed in an interface .
In all listed orders, its order type will mentioned like
"ORDER TYPE:A-type"
According to these three types certain scenarios will be executed. I need to identify this type. In a page there may be more than one A-type/B-type/C-type orders.
here the orders will be listing one by one will all user details along with order type. please help in this.
its html tag details:
order Type: A-type

Magento migration from 1.9.1.0 to Magento 2 doesn' show product in front end

I have installed Magento 1.9.1.0 with sample data, without error. After that installed magento 2x without error. Then i migrate content from 1.9.1.0 to 2x with data migration tool, and it completed. Products and almost all informations are migrated, and i can see product in Admin side. But couldn't visible for other users.It showing 'We can't find products matching the selection.'. What would be the problem???
To show the product, check if the product following options:
General->Status = Enabled
general->Visibility = Catalog,Search
Inventory->Qty > 0
Inventory->Stock Availability = In Stock
Websites = checking your site
Catgories = checking your category.
If you want checking product to subcategory, go to Catalog->Manage Categories->Select your category, open tab Display Settings and change option "Is Anchor" to "Yes". Save category

Pagination and form tag issue

i have two .php files: trialform.php and trialaction.php
User chooses search terms using <select> tags on trialform.php, and then that information goes to trialaction.php that has mySQL $query=SELECT * ... which contains variables like $expression1 etc. (Depending on the user's choice).
It works fine. But I wanted to implement pagination from this source
Now my query works only for the first pagination page, when I click on the second and third...it does not show any results. The problem is that the $query=SELECT * ... refers to trialform.php, and it does not exist after the user pressed "Submit".
Do I have to split my $_POST code section in a separate .php file in order to be able to use pagination and <form>?
this is often performed with parameters on subsequent pages passing updates to the page number (gets you the start parameter) and limit as can be seen here http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/paging.html
and viewing the http headers in fiddler. for page 4 you get
GET /forum/topics-browse-remote.php?_dc=1368498808032&page=4&start=150&limit=50
and page 5 is
GET /forum/topics-browse-remote.php?_dc=1368498808032&page=5&start=200&limit=50
so subsequent pages (prior or next) know where to start. naturally the parameters are fed into the select statement such as
select * from employee limit 200,50 # start,limit

Trac Advanced Reports

I have a trac report that displays how many tickets are at each stage of the workflow. Is it possible to make reports dynamic, so if a row is clicked a report for those tickets are shown.
SELECT stage,
count(status) as 'Number of Matches',
id as _id,
'[..1] Tickets Here' as link
FROM ticket
Failing that, it would be useful to have a link to another report that shows all the tickets at that stage but links are seen as text in the report.
[..1] Tickets Here
You can also make dynamic reports using wiki pages. Personally, I find that to be the easier approach most of the time.
For your purposes, you could have something like this:
== Open Tickets, By State ==
[report:4 New] ([[TicketQuery(status=new,format=count)]])\\
[report:5 Accepted] ([[TicketQuery(status=accepted,format=count)]])\\
[report:6 Code Review] ([[TicketQuery(status=codereview,format=count)]])\\
[report:7 Testing] ([[TicketQuery(status=testing,format=count)]])
This will result in output that looks like:
New (40)
Accepted (12)
Code Review (8)
Testing (17)
where the name of the state is a link to a detailed report listing all of the tickets in that state. You will need to create a report for each state and fill in the correct report numbers for the report:# links in the example.
If you are interested in viewing this information per milestone then you might do well to customise your milestone page instead of creating a separate report. This page explaining how to create custom state groupings in the milestone progress bar will be useful to you in such case.