Nice, BetaJ....works for me, except for that it does not import numbers, where the decimal character is “,” (comma). Any idea how I set this up? Of course I set my profile to use “,” instead of “.”. I manipulated my file to numbers with “.” decimals and it worked...if I keep “,” it puts the respective number to 999.999999999.
Nice, BetaJ....works for me, except for that it does not import numbers, where the decimal character is “,” (comma). Any idea how I set this up? Of course I set my profile to use “,” instead of “.”. I manipulated my file to numbers with “.” decimals and it worked...if I keep “,” it puts the respective number to 999.999999999.
Hello,
I think you must use a ‘.’ when you doing it via this php-method, because everything must be in the english format.
The question is, how to set up the local settings to a new php file like these, and I don’t know that. Maybe somebody
else?
It must be something like
Mage::app()->setCurrentLocale(....) // or something similar
but I don’t search in the code for that because english with ‘.’ work for me perfect.
Greetings
BetaJ
I’ve created a different version of this script to allow you to export products using a cron job…
----------------------
//uncomment when moved to server - to ensure this page is not accessed from anywhere else //if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { // die("You are not a cron job!"); //}
if ($profileId) { $profile->load($profileId); if (!$profile->getId()) { Mage::getSingleton('adminhtml/session')->addError('The profile you are trying to save no longer exists'); } }
As I read posts above, and another threads, it seems my need is a little complicated.
I would like to import product information (name, sku, short description, description, stock information, custom parameters for frontend search, metadata, manufacturer, price and taxe) and product images all in a single file.
I would also want to make possible updating price and stock information with a single file for all products.
Is the code valid for both of my needs, what adjustments should I have to do?
BTW When is a CSV imoprt feature available for Magento?
<?php //uncomment when moved to server - to ensure this page is not accessed from anywhere else //if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { // die("You are not a cron job!"); //} #echo "hallo"; ini_set('memory_limit', '4000M'); ini_set("max_execution_time", "30000"); //uncomment when moved to server - to ensure this page is not accessed from anywhere else //if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { // die("You are not a cron job!"); //}
if ($profileId) { $profile->load($profileId); if (!$profile->getId()) { Mage::getSingleton('adminhtml/session')->addError('The profile you are trying to save no longer exists'); } }
<?php //uncomment when moved to server - to ensure this page is not accessed from anywhere else //if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { // die("You are not a cron job!"); //} #echo "hallo"; ini_set('memory_limit', '4000M'); ini_set("max_execution_time", "30000"); //uncomment when moved to server - to ensure this page is not accessed from anywhere else //if ($_SERVER['REMOTE_ADDR'] !== '<your server ip address') { // die("You are not a cron job!"); //}
if ($profileId) { $profile->load($profileId); if (!$profile->getId()) { Mage::getSingleton('adminhtml/session')->addError('The profile you are trying to save no longer exists'); } }
Very interested in using this script - have a question.
This script is to run an import profile - and in the profile the file name is sent in as a parameter. But why can’t the script pull the file name out of the profile parameters?
I think there’s been some really clever work here - and it’s fantastic that we should be able to run profiles from the command line.
I take it that the profiles need to be a typical type - i.e. Entity Type Products - Direction import - Data transfer local/remote server - Type format - Original Magento attribute names in first row - Yes.
All in all - it’s brilliant that srinigenie has been able to pull out the script and the other contributors have fixed bits.
I’ve not tried it yet - but am really hopeful that it works as I need to pull in approx 90,000 records - and the updates need to be automated.
i just installed lilmuckers Extension through MC in non productive enviroment - let me say thanks for this at first.
The only problem is that the cron isn’t running cause i don’t now how exactly set up your field “Cron Expression” - i am using a standard cron expression without call to a function atm ( */5 * * * * ). That doesn’t work for me - the profile itself is running correctly if i started it manually. The cron logs are empty…
The ‘profile log’ is only populated if you use adaptors that support it (this was an addition required for the clent I was working with, and I figured it might be useful for others)
I assume you’ve set up the standard cron for magento. If not this is in the magento wiki. (I’m on the train with my iPhone so it’s hard to get the URL)
the next thing to check is the profile history.
There should be entries appearing in here when the cron runs.
If you’ve installed v0.1.5 then another check is to not have a cron user set and errors will appear in the profile log.
Hope these help, I’ll post more if I think of it when I get home.