I intend to import categories into my magento from csv file. I use ValueRemapper of magmi. The Replaced Attribute is categories. And the New Values for categories is
{{ ValueRemapper::use_csv('C:\xampp\htdocs\magento\var\import\category_ids.csv')->map({item.categories) }}.
But when I run the import I get errors
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound....
I tried to change the path to the csv file both with absolute and relative path, but it still has the same error. Could anyone give me a clue what the real problem of my setting? And any solution would be appreciated. Thank you.
you seem to be missing } here:
->map({item.categories)
Try:
->map({item.categories})
Related
I want to create an import from a CSV but i can't modify the CSV file.
So i need to define default values for a couple required fields in Magento (like "type" ( > Simple Product ) etc.
I'm looking at https://stackoverflow.com/a/7319214/2252078 to make a custom Adapter and that inject the missing required values in the array before saving.
But i already get an error that says:
Method "parse" not defined in adapter spaanproductions_basics/convert_adapter_product
So i can't even begin with my custom code.
Maybe someone has a beter idea how to create some default values, or how to fix this issue.
Magento version: 1.9.1.1
Thanks in advance.
Kind regards,
Sonny
Not sure what the problem is, your code does seem to be valid. You could try http://pastebin.com/vxewc0Zt . OR temporarily rename your app/code/local/Spaanproductions/Basics/Model/Covert/Adapter/Product.php to verify wetter the right class is actually being loaded although I highly doubt that's the problem
-- Edit (See comments) --
try changing spaanproductions_basics/convert_adapter_product to basics/convert_adapter_product your models are defined under basics, not under spaanproductions"
At the first you have to export products as a csv file to catch the structure and then modify that as you need.
Take a look at this answer, it could be useful:
Update Magento products with multiple images
I'm trying to create a second invoice template and add another print invoice link so I can print a standard invoice but also print a 'internal' invoice copy with an 'Official Use' table in which can be filled out by staff on the print out.
I've found the template invoice.tpl and print_invoice.tpl in /basic/mail/orders/
created two new files called invoice.dirty.tpl and print_invoice_dirty.tpl and pasted the content of the original files in the new ones, changed the path and added the table I wanted.
I've managed to locate the code for the 'Print Invoice' link and duplicated that changing the href by adding _dirty to the original 'orders.print_invoice?' but when I try the link it opens the popup ok but I get a 404 error, i've checked the permissions and changed them to full but still it won't play ball...
it seemed quite simple and I expected it to work but obviously i'm missing something, any guidance would be appreciated.
Check controllers that bring data to this files, maybe there is the main problem.
What cs-cart version are you using?
You need to create also the mode > invoice_dirty and this can be added with the help of file order.post.php but before i can give you some instructions i need to know you cs-cart version
I try to import an image to a Podscms custom content type 'blank slate' table.
I have already created it, and want to import data via a CSV file. I have already uploaded the images, so I thought I can provide only the imagelink and it would be good to go. However, no.
Look at some code:
CSV:
My image; http://www.example.com/wp-content/uploads/image.jpg
Code to import, found in the Pods.io docs, and my question I also found in this unanswered github request: https://github.com/pods-framework/pods/issues/1530
PHP:
<?php
$api = pods_api('images');
$api->import($csvFile, false, 'csv');
?>
I get an error that the image not is found. I think I need to provide an array via CSV.But I cannot found anything about the format for that.
It appears as though you're using a semicolon instead of a comma as your separator.
Currently I'm strugling with the valueremapper option within the value replacer plugin of MAGMI. Somehow he get's the item id from my current column(Category_copy), but it does not map it to the correct value in the corresponding csv located on my website. (remapcategories.csv). It seems that he is not using the csv.
My case:
I create a new field category_ids. And as a value I put in:
{{
ValueRemapper::use_csv('http://mydomain.com/remapcategories.csv')->map({item.Category_copy})
}}
My csv file looks like this. There is no markup, no quotes and no heading (just like the magmi manual suggests)
HARDWARE|LAPTOPS;3
SOFTWARE|GAMES;5
I'm getting the following error message while uploading:
Invalid category ids found for sku 718037780566:HARDWARE|LAPTOPS
It seems that it does get the value from the Category_copy, but it won't map it to "3".
Any experienced magmi user who can help me here?
You should use "/" instead of |
Also do not use absolute path for your CSV
hope this helps
I have an attribute called "colour" in my shop and want to display the colour names in different languages. For product import I use MAGMI v0.7.18. The MAGMI Wiki says:
Import admin values first:
"store","sku","myselect"
"admin","sku001","adminval1"
"admin","sku002","adminval2"
"admin","sku003","adminval3"
Once done, the following csv mockup will produce "translated" values:
"store","sku","myselect"
"store1","sku001","store1val1::[adminval1]"
"store2","sku001","store2val1::[adminval1]"
"store1","sku002","store1val2::[adminval2]"
"store2","sku002","store2val2::[adminval2]"
That´s exactly what I did!
My admin import:
"sku";"store";"color"
"1101401-401";"admin";"white"
My storeview import:
"sku";"store";"color"
"1101401-401";"deutsch";"weiß::[white]"
But after the import ist done, the attributes are muddled. See here.
Any idea about that problem?
Thanks!
I had this issue and the cause was having the original and translated attribute titles in the wrong places.
I had
"white::[weiß]"
and it needs to be
"weiß::[white]"
where white was my original attribute value title