I have attributes in the form of a CSV file. What I want to do is just create these attributes. I do not need to define any product. How can I do this?
Thanks.
Related
I have created a table in Wordpress using WpDataTable plugin. I need to extract one value from the table for some specific purpose. How can I achieve this ?
I have created the custom plug-in to store the user information via CSV import. For that i have created the custom post types along with custom fields. But everything stored in my database, except special characters in user name like 'Évana '. How to overcome this problem.
update_post_meta($post_id,'username_name', $line_of_text[1]);
Note: I have read all the values from CSV and converted into array. Here $line_of_text[1] holds the values of user name.
I stored the special characters values in my post title using the htmlentities() function.
http://php.net/manual/en/function.htmlentities.php
I have a .csv file containing list of companies. I want to upload that .csv file so it will update the database, and in WordPress I want to see that data and edit it too.
I tried Custom Post type (ecpt plugin) and created the post type and created the meta-boxes each for one field, but I cannot show those values in the post fields. Can anyone tell me where I am wrong?
Thanks
After you create a custom post type, you need to enter your data.
And you need to make sure your template is coded to display that data.
As far as uploading a CSV, unless ECPT has that capability, you'll to use something like phpmyadmin to import the CSV into the database.
I have created two content types in Plone 4.3 via Dexterity and created a Plone Product on the file system.
The types are
Supplier
item
Items can only exist in inside Supplier, and I can manually create new items without
I'd like to be able to create a bunch of items if I upload a CSV file while creating a supplier. Any way dexterity supports this (trigger, custom view...)?
You'd have to handle that in a custom view. There is no pre-existing code to handle that.
For simple cases, just read the uploaded file with the csv module and use the rows to create items in the Supplier container:
from plone.dexterity.utils import createContentInContainer
import csv
reader = csv.reader(uploadedfile)
for row in reader:
createContentInContainer(supplier, 'your.package.item', title=row[0], ...)
For more complex operations, you could build a transmogrifier pipeline with the transmogrify.dexterity to convert CSV-data to dexterity objects, but that is probably overkill here.
Given a set of uploaded files in Request.Files, how do figure out which form field yielded which file?
I have a generic form emailer that various forms post to. This file generates an email of the name/value pairs contained in the form post. I'm trying to add support for uploaded files such that the table of name/value pairs will show the name of the file upload element and the name that the file was saved as.
However, I can't figure out how to link that information together. HttpPostedFile doesn't contain any information about the HTTP request (like which field name was used), and Request.Form doesn't contain any entries for uploaded files.
So while I can easily upload the files, I don't have an easy way to generate an email saying "this uploaded file was for this field, and this uploaded file was for that field".
Request.Files.Keys is a collection of field names corresponding to each uploaded file.