Page Content Import

Permalink Browser Info Environment
Hi

I cant figure out how to import page content. I may be making assumptions but my idea was to create a file (ie content.htm) which has HTML in the file and then import it into a field that has a WYSIWYG editor in it.. the idea was to avoid having large amounts of HTML in an excel spreadsheet and trying to do it that way. When I imported the file it just put the name of the file in the WYSIWYG editor.. ie content.htm NOT the actual content.

If it cant be done via the "Page Content Directory Path" then how have others done it.. or am I stuck placing it in the excel spreadsheet.

Thanks

Type: Discussion
Status: In Progress
jolly
View Replies:
tbcrowe replied on at Permalink Reply
tbcrowe
To including HTML content in an imported page you need to use the content_file tag, e.g.:
<content_file>content-0.html</content_file>

If this tag is present for a page Import will automatically create a content block and fill it with the contents of the designated file. At present only one such content file per page is supported.

- Todd
jincmd replied on at Permalink Reply
jincmd
Where can I find more documentation on requirements for all fields?
jincmd replied on at Permalink Reply
jincmd
does
<content_file>content-0.html</content_file>

go anywhere in the file?
tbcrowe replied on at Permalink Reply
tbcrowe
All of the documentation for Import is built into the dashboard pages. The content_file tag is documented on the Page Import page. All you need to do to use it is set the Page Content Directory Path setting on the Dashboard > eCommerce > Import page, upload your HTML content the directory identified by that setting, and then write your XML to contain the correct file names.

The XML examples appear with all of the other documentation. If the XML examples are not appearing in your dashboard it's likely that you have a javascript error or other problem with you concrete5 installation. You can also view the XML examples by looking at the files in your {concrete5 root directory>/packages/core_commerce_import/xml directory.

- Todd
jincmd replied on at Permalink Reply
jincmd
Thanks Tod for reiterating...

just to be sure I am clear, you're saying the the HTML for my product needs to in a separate XML file?
jincmd replied on at Permalink Reply
jincmd
You put this in your documentation

"
As with product imports and product images, when you import pages you will typically have some basic content you will want to include with each page. Place the content for each page in its own file then upload the content files into a directory. Use the 'Page Content Directory Path' to tell the eCommerce Import add-on where to find these files. Follow these steps to set up the content files:"

Is this, what what refers to....
Page Content Directory Path
(relative to your Concrete5 install directory, e.g. files/import_content)
?

Next question, is it only HTML that is allowed in these "per-product" files ?
jincmd replied on at Permalink Reply
jincmd
aha so this <content_file>content-0.html</content_file> gets placed in each product XML

and content.html should simply create the html for the product description?
jincmd replied on at Permalink Reply
jincmd
Would you please explain further this portion of the XML options

<accessories> is accessories an attribute?
<name>Optional Accessories</name>
<type>product_price_adjustment_select</type>
<required />
<multiple />
<keyword_search />
<advanced_search />
<option>
<name>Tail Fins</name>
<price_delta>20</price_delta>
</option>
<option>
<name>Hollow Point</name>
<price_delta>10</price_delta>
</option>
<display_order>alpha_asc</display_order>
</accessories>


Why is is specifying the type of attribute? isn't that already be configured on my system?
tbcrowe replied on at Permalink Reply
tbcrowe
The type tag is required for product options because Import automatically creates product option attributes if necessary when the product is imported. While in theory the type could be inferred if an attribute already existed, Import does not currently support this.
tbcrowe replied on at Permalink Reply
tbcrowe
Import does not support the content_file attribute with products. That attribute is only supported for page import. Otherwise, you are correct.
jincmd replied on at Permalink Reply
jincmd
so if I have already configured in my store, a product attribute "Size" , and a Color for customer option


While import when I include (almos treplicate) all attribute fields in the xml, like type etc, will it assign it to the already configured attributes? or create new ones
tbcrowe replied on at Permalink Reply
tbcrowe
Normal product attributes are re-used by Import and must exist before products are imported. So, yes, if you already have a "size" attribute and your XML contains a "size" tag for products, Import will store the size value for the product in that attribute.

Product option attributes are different from normal product attributes. Product option attributes are product specific and are created independently for each product. This is the way the eCommerce package works, by the way; it's not something specific to Import.
CaptainPanda replied on at Permalink Reply
CaptainPanda
I know this is an old post but I have a question regarding this. (For products) Do I just put the HTML in the <description></description> tag in my XML, or is there a special tag I should use?
tbcrowe replied on at Permalink Reply
tbcrowe
That's correct, just put the text and/or HTML in between the <description></description> tags. Please make sure, though, that if you do include HTML tags that you properly enclose the XML in CDATA tags.
CaptainPanda replied on at Permalink Reply
CaptainPanda
Cool thanks for the fast reply :)
pkeller replied on at Permalink Reply
pkeller
It looks like this discussion got hijacked to a product import, but with a page content import i'm getting this error: eCommerce Import: content file missing or unreadable: filename.html . I specified the html content file names using the <content_file> tag in the page import xml file, and placed these files into the specified Page Content Directory Path.
I'm not sure if it's having trouble finding the files, or the file contents are unexpected.
I tried placing the content file folder at the web root (same level as the concrete directory), as well as within the concrete directory.
The content files originally contained html tags (h1, p, font, etc.) within <>. I tired stripping out the <h1> and then the remaining html formatting so only text contained in the content files, but same error.
Help!
pkeller replied on at Permalink Reply
pkeller
Sorry, just noticed my Page Content Directory Path had a leading / so the import could not possibly find the files. I removed that and smooth sailing, so I'm good to go.
Also, in case anyone reads this at a later time, it does allow html tags (including h1, p, font) within the content files, although they are not necessary either

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.