magento - import configurable product with magmi - magento

Before posting this question, I've tried ways to make this work but it doesn't.
This is the csv structure:
|model - map to sku
|name
|price
|category - map to categories
|loc
|image - use image plugin - works fine
|description
|weight
|option_type
|option_value
|suggested_retail
|special_handling
|manufacturer
|manufacturer_code
|packaging
|in_stock
|last_updated
|active
|visibility : default mapper plugin, value: 'Catalog, Search'
|configurable_attributes : default mapper plugin, value: 'manufacturer,color'
example csv file: http://pastebin.com/kRW2vQrY.
All simple products are imported fine but the configurable ones don't. I already activate the configurable items with these settings:
Perform simples/configurable link Yes
auto match simples skus before configurable Yes
Force simples visibility No
I want to know why it doesn't work and solution for this problem ?
Thanks for reading :)

Since I solve the problem by writing my own parser to map some specifics column from original csv to magmi's csv structure. And I also create another file for configurable product with new two columns :
type : 'configurable'
simples_skus: list of simple skus
Thanks for reading and discussing :)

As I understand the automatic mapping, it is based on the attributes you specify for configurable_attributes (in your case manufacturer,colour). However, your csv structure does not seem to include values for the colour attribute

Related

How to find the date and time the order was cancelled in Magento 1.9.x

Bit of a complex question for you..
I am exporting orders from Magento 1.9.4.0 using an extention from XTENTO.
It uses XSL to build 'profiles' to all me to cycle through orders programatically and export them in a format of my choice.
I have everything working aside from pulling the correct date the order was cancelled. I can see that in Magento this date appears to be in the table 'sales_flat_order_status_history'.
Looking at the table i can see the following:
sales_flat_order_status_history table
And the XSL I have been using is below..
XSL query
It IS finding a date; but it is finding the LAST update to the order and pulling the created_at value.
Does anyone know how I could find the FIRST timestamp where the order was in a cancelled state using the XSL notation?
The documentation for the XSL engine is available here, if helpful: https://support.xtento.com/wiki/Magento_Extensions:Magento_Order_Export_Module#2.29_Export_Fields
Many thanks
This seems to be hardcoded on your module files.
You could be able to change the query it is making to the database. I can't give complete guidance since I do not have the module files to look at.
Try opening the module folder in some code editor and search for something like:
Mage::getModel('sales/order_status_history')
You will then find where the code may reside and then change the query to filter for what you want.

Magento - Importing Products in csv file - empty columns

I am currently adding all my products into a csv file ready to import into my store. To get the template i exported my existing products and am using that csv as the template which contains every single column.
I have a lot of empty columns such as...
custom_design_from manufacturer minimal_price msrp special_price
etc..
Do i need to include these empty columns? If i remove them will that mess up my import?
no it will not effect , you can remove them from csv and import
No it will not mess up your import, however be careful when making edits to the csv file as some programs save the file in the wrong csv format I'd recommend open office and when you hit save make sure you push in current format

Magmi Not Importing When CSV Files Contains Commas

I have installed and made some successful product imports in to Magento using Magmi, but as soon as I try to import any data where the spreedsheet columns have commas [,] Magmi will not perform the import.
For example when I save the data in this speadsheet as a CSV file Magmi successfully imports the data;
http://i.imgur.com/PpDt0PS.png
However, Magmi refuses to import the data in the table below, where you can see in column F I have added data that include 'commas'.
http://i.imgur.com/MtGJPCw.png
Can anyone advise. I am using an Apple Mac with OpenOffice to prepare and save my data.
Is the data not importing entirely, or is just the visibility column not being set?
Visibility is a Magento core attribute which Magmi can set by using exact numerical option id value.
Generally, the option values you want to use for the visibility field are as follows:
Not Visible Individually = 1
Catalog = 2
Search = 3
Catalog, Search = 4
So in your case, if you want to set these products to Catalog, Search, you can set the visibility column value to 4.
To double-check that the above mapping is correct for your instance of Magento, the easiest way is as follows:
Go edit any product
Look for the Visibility drop down field, and right click > inspect element
In the developer tools, take note the values associated to each label.
Below an example of the process and what to look for.
Axel is correct, you should set the data to the numerical value 4.
But I do also recommend you explore a better way to export CSV content from Open Office. You may have to start a new document because I find I only see the dialogue below once and then I never see it again. Create a new document, paste your data into it. Choose save-as, select CSV, and save it. Eventually you should see the dialogue below. Change the encoding to UTF 8, the text delimiter to " and tick the 'Quote all text cells' box.
Then you should be able to have any cells with commas or other things in them. Always ensure you CSV files are quoted. "like","this","so you, can","have commas, in them". It is worth inspecting your CSV file in a text editor to see the format is as expected before uploading it to MAGMI.

line break in csv file content

Guys i need to create a very simple csv file with some product details in order to import them to an online shopping site. Each product has 3 attributes: name, description and price.
The csv file would look like this:
product 1,product description,100
product 2,product description,100
product 3,product description,100
I have 2 problems:
1) each product description has more than one line, something like
This the product's description.
This is a cool feature.
This is another feature.
Product made in the US.
How can i keep/add this formatting in the csv file?
2) second problem, most product descriptions contain a comma "," in there, like:
This product is great, reliable and also cheap.
How can i add these commas to the description without breaking the csv format?
And a final question: some product descriptions have more than 800 or even 100 characters. Is it possible to add that much characters in a field in a csv?
A workaround for the first problem is to use HTML <br/> tags instead of line breaks. That's what I'm doing, at least until I find a better solution.
So you would change:
This the product's description.
This is a cool feature.
This is another feature.
Product made in the US.
to:
This the product's description.<br/>This is a cool feature.<br/>This is another feature.<br/>Product made in the US.
As for the second problem: in my tests, Magento didn't seem to have any trouble with commas within fields. But you can always change the delimiter Magento uses. I usually use tab (\t). Make sure to use Magento's advanced import features in System > Import/Export > Dataflow-Profiles.

Freemarker Help: Pass Data to List Directive for Sorting

First time poster and a Freemarker novice. I'm hoping someone can assist on this. I am currently referencing data from a 1-to-many table using the <#data> directive. I want to sort the results in a particular field order, but I think that can only be done by the <#list> directive. Here's what I have so far:
There's a CART_ABANDONMENT table with the following fields:
CUSTOMER_ID_
PRODUCT_ID
PRODUCT_NAME
PRODUCT_PRICE
ABANDONED_DATE
<#data CART_ABANDONMENT as abandonment><br>
<#filter CUST_ID="${CONTACTS_LIST.CUSTOMER_ID_}"><br>
<#fields PRODUCT_ID PRODUCT_NAME PRODUCT_PRICE ABANDONED_DATE><br>
${abandonment.PRODUCT_NAME} ${abandonment.PRODUCT_PRICE}<br>
</#data>
What I want to do is to list all related results (by CUSTOMER_ID_) and sort them by PRODUCT_PRICE, descending.
It may be something simple, but I haven't been able to find the answer.
Any guidance would be appreciated.
Freemarker is powerful tool tool but it's just template engine.
It has the sort directive for list, but it can be applied only to built-in types: String, Number and Date.
You may convert list of you complex type to one or more lists of built-in types and use ?sort in template.
Another way is to pass already sorted(as you want) list to template before processing.
What you want sounds like something that should be solved on the database (SQL) level, especially where you say "list all related results (by CUSTOMER_ID_)". FreeMarker is only the V (for View) in MVC.

Resources