Cannot add new products or they get mixed up with updated ones, no errorGet soled Products with counter in Magentonew products on home page magento CE1.9 with rwd themeCreate categories through installerSet Products Out Of Stock If They Haven't Been Updated Within A DayAdd new Attributes with Add more buttonadd to cart products with max qty of products error with run scriptSQL Error When Making New Products on Magento “Column 'price_type' cannot be null”Add multiple products with one submit buttonMagento 1.9 - Get new productsExport Category name in xml feed Magento 1.9.2

Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?

Optimising a list searching algorithm

Constant Current LED Circuit

PTIJ: Why do we blow Shofar on Rosh Hashana and use a Lulav on Sukkos?

Why didn't Héctor fade away after this character died in the movie Coco?

Using Past-Perfect interchangeably with the Past Continuous

Is it possible to stack the damage done by the Absorb Elements spell?

What are substitutions for coconut in curry?

Violin - Can double stops be played when the strings are not next to each other?

I seem to dance, I am not a dancer. Who am I?

Why is indicated airspeed rather than ground speed used during the takeoff roll?

Can a medieval gyroplane be built?

Existence of a celestial body big enough for early civilization to be thought of as a second moon

Bash - pair each line of file

What is the significance behind "40 days" that often appears in the Bible?

What is the English word for a graduation award?

How could an airship be repaired midflight?

When did antialiasing start being available?

Variable completely messes up echoed string

Practical application of matrices and determinants

Comment Box for Substitution Method of Integrals

Help prove this basic trig identity please!

What can I do if I am asked to learn different programming languages very frequently?

Worshiping one God at a time?



Cannot add new products or they get mixed up with updated ones, no error


Get soled Products with counter in Magentonew products on home page magento CE1.9 with rwd themeCreate categories through installerSet Products Out Of Stock If They Haven't Been Updated Within A DayAdd new Attributes with Add more buttonadd to cart products with max qty of products error with run scriptSQL Error When Making New Products on Magento “Column 'price_type' cannot be null”Add multiple products with one submit buttonMagento 1.9 - Get new productsExport Category name in xml feed Magento 1.9.2













0















I have written a simple script that downloads an XML with product info from a wholesale parse it and save new products or updates exiting ones. It has been working for a few months, but now it's getting really strange. It updates existing products correctly, but it doesn't add a new ones (no error at all) or it overwrites an existing product with the new ones data. I've been trying to find any clue, to debug I output almost any valuable info, but it just won't work.



This is my script:



<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
require_once('Kategorie.php');
$kat = new Kategorie();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');

$xml=simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getdb&id=XX&p=XX") or die("Error: Cannot create object ksiazki");
//$xml=simplexml_load_file("testdb.xml");

$ksiazki = array();
$dostepnosc = array();
$ceny = array();

echo count($xml->books->book)." książek pobrano.<br>";

if (count($xml->books->book) > 0)

foreach ($xml->books->book as $book)

if ($book->attributes()->dzial == "KC")

if ($kat->isIndexHistoric((string)$book->attributes()->indeks))

array_push($ksiazki, $book);

//pobieranie obrazow
$url = "http://services.azymut.pl/oferta/servlet/?mode=getImg&indeks=".$book->attributes()->indeks."&id=XX&p=XX";
$path = dirname(__FILE__)."/media/books/".$book->attributes()->indeks.".jpeg";
$urlFile = "/media/books/".$book->attributes()->indeks.".jpeg";
try

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$img = curl_exec($curl);
curl_close($curl);
$data = imagecreatefromstring($img);
if (isset($data))

imagejpeg($data,$path);


catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());


echo $book->attributes()->indeks.": ".(file_exists($path) ? "Pobrano obrazek.(/media/books/".$book->attributes()->indeks.".jpeg)<br>" : "Brak obrazka w bazie Azymuta.<br>");




$transakcja = $xml->attributes()->transactionId;
echo "Transakcja ".$xml->attributes()->transactionId."<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getAvail&id=XX&p=XX") or die("Error: Cannot create object dostepnosc");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$dostepnosc[$index] = intval($book->attributes()->p);


echo "Pobrano ".count($dostepnosc)." dostepnosci.<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getPrice&id=XX&p=XX") or die("Error: Cannot create object ceny");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$ceny[$index] = $book->attributes()->cena;
$ceny[$index] = 1.30 * $ceny[$index]; //marza 30%
$ceny[$index] = 1.05 * $ceny[$index]; //vat 5%
$ceny[$index] = round($ceny[$index], 1);


echo "Pobrano ".count($ceny)." cen.<br>";

for ($i = 0;$i < count($ksiazki);$i++)
file_exists($path2) ) && $mediaCount == 0 && !$aktualizacja )

$finalPath = ( file_exists($path) ? $path : NULL );
if (!isset($finalPath))

$finalPath = ( file_exists($path2) ? $path : NULL );


if (isset($finalPath))

try

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$product->setMediaGallery (array('images'=>array (), 'values'=>array ()));
$product->addImageToMediaGallery(($finalPath), array('image','small_image','thumbnail'), false, false);
echo "Dodano obrazek.<br>";

catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());



else if ($mediaCount != 0 && ( file_exists($path)


if ($i == count($ksiazki) - 1 || count($xml->books->book) == 0 || count($ksiazki == 0))

//file_get_contents("http://services.azymut.pl/oferta/servlet/?mode=confirm&id=XX&p=XX&transactionId=".$transakcja) or die("Error: Cannot create object confirmation");
echo "Koniec transakcji.<br>";



?>



Why Am I deleting the products at the beginning? It was just one of my blind shots, I wanted to start fresh, but the result was: none of the 500 products has been saved.



And here is the example of the output:



<code>
500 książek pobrano.
37100801579KS: Pobrano obrazek.(/media/books/37100801579KS.jpeg)
41595401615KS: Brak obrazka w bazie Azymuta.
41976601579KS: Pobrano obrazek.(/media/books/41976601579KS.jpeg)
42172001579KS: Pobrano obrazek.(/media/books/42172001579KS.jpeg)
43471102044KS: Brak obrazka w bazie Azymuta.
47354301615KS: Pobrano obrazek.(/media/books/47354301615KS.jpeg)
47359102056KS: Pobrano obrazek.(/media/books/47359102056KS.jpeg)
47495801965KS: Pobrano obrazek.(/media/books/47495801965KS.jpeg)
48445501615KS: Brak obrazka w bazie Azymuta.
49282501184KS: Brak obrazka w bazie Azymuta.
49596001579KS: Pobrano obrazek.(/media/books/49596001579KS.jpeg)
49686001350KS: Pobrano obrazek.(/media/books/49686001350KS.jpeg)
49974001615KS: Pobrano obrazek.(/media/books/49974001615KS.jpeg)
50090000207KS: Pobrano obrazek.(/media/books/50090000207KS.jpeg)
50256601579KS: Pobrano obrazek.(/media/books/50256601579KS.jpeg)
52775100231KS: Pobrano obrazek.(/media/books/52775100231KS.jpeg)
53308401041KS: Pobrano obrazek.(/media/books/53308401041KS.jpeg)
53650002269KS: Brak obrazka w bazie Azymuta.
54326401144KS: Pobrano obrazek.(/media/books/54326401144KS.jpeg)
55247402249KS: Brak obrazka w bazie Azymuta.
55250302062KS: Brak obrazka w bazie Azymuta.
57158801622KS: Pobrano obrazek.(/media/books/57158801622KS.jpeg)
57575602706KS: Pobrano obrazek.(/media/books/57575602706KS.jpeg)
58264602706KS: Pobrano obrazek.(/media/books/58264602706KS.jpeg)
60139002894KS: Pobrano obrazek.(/media/books/60139002894KS.jpeg)
60143302894KS: Pobrano obrazek.(/media/books/60143302894KS.jpeg)
60159902894KS: Pobrano obrazek.(/media/books/60159902894KS.jpeg)
60160802894KS: Pobrano obrazek.(/media/books/60160802894KS.jpeg)
60161202894KS: Brak obrazka w bazie Azymuta.
61274601830KS: Brak obrazka w bazie Azymuta.
61829501075KS: Brak obrazka w bazie Azymuta.
61977702706KS: Brak obrazka w bazie Azymuta.
62104401430KS: Pobrano obrazek.(/media/books/62104401430KS.jpeg)
63614801262KS: Brak obrazka w bazie Azymuta.
64253303114KS: Brak obrazka w bazie Azymuta.
64894500149KS: Brak obrazka w bazie Azymuta.
65196601622KS: Brak obrazka w bazie Azymuta.
65392002743KS: Brak obrazka w bazie Azymuta.
66167802894KS: Brak obrazka w bazie Azymuta.
66338102894KS: Brak obrazka w bazie Azymuta.
66690002894KS: Brak obrazka w bazie Azymuta.
66988102894KS: Brak obrazka w bazie Azymuta.
67454302494KS: Brak obrazka w bazie Azymuta.
67848500153KS: Pobrano obrazek.(/media/books/67848500153KS.jpeg)
68804402044KS: Pobrano obrazek.(/media/books/68804402044KS.jpeg)
70217100206KS: Brak obrazka w bazie Azymuta.
70217400206KS: Brak obrazka w bazie Azymuta.
70227603326KS: Pobrano obrazek.(/media/books/70227603326KS.jpeg)
70341400124KS: Pobrano obrazek.(/media/books/70341400124KS.jpeg)
70360802389KS: Pobrano obrazek.(/media/books/70360802389KS.jpeg)
70362502608KS: Pobrano obrazek.(/media/books/70362502608KS.jpeg)
70486401049KS: Pobrano obrazek.(/media/books/70486401049KS.jpeg)
70491003053KS: Pobrano obrazek.(/media/books/70491003053KS.jpeg)
70491203053KS: Brak obrazka w bazie Azymuta.
70526003143KS: Pobrano obrazek.(/media/books/70526003143KS.jpeg)
70526701252KS: Brak obrazka w bazie Azymuta.
70530302894KS: Brak obrazka w bazie Azymuta.
70550401646KS: Brak obrazka w bazie Azymuta.
70551601405KS: Brak obrazka w bazie Azymuta.
70557401144KS: Brak obrazka w bazie Azymuta.
70559601648KS: Pobrano obrazek.(/media/books/70559601648KS.jpeg)
70649402608KS: Brak obrazka w bazie Azymuta.
70658902608KS: Brak obrazka w bazie Azymuta.
70662201184KS: Brak obrazka w bazie Azymuta.
70682202798KS: Brak obrazka w bazie Azymuta.
70685101549KS: Brak obrazka w bazie Azymuta.
70689500208KS: Pobrano obrazek.(/media/books/70689500208KS.jpeg)
70693701252KS: Brak obrazka w bazie Azymuta.
70695103053KS: Brak obrazka w bazie Azymuta.
70719900208KS: Pobrano obrazek.(/media/books/70719900208KS.jpeg)
70720100208KS: Brak obrazka w bazie Azymuta.
70720200208KS: Pobrano obrazek.(/media/books/70720200208KS.jpeg)
70720400208KS: Pobrano obrazek.(/media/books/70720400208KS.jpeg)
70740003022KS: Pobrano obrazek.(/media/books/70740003022KS.jpeg)
70744600203KS: Pobrano obrazek.(/media/books/70744600203KS.jpeg)
70753403053KS: Pobrano obrazek.(/media/books/70753403053KS.jpeg)
70755102370KS: Pobrano obrazek.(/media/books/70755102370KS.jpeg)
70755302370KS: Pobrano obrazek.(/media/books/70755302370KS.jpeg)
70761603133KS: Brak obrazka w bazie Azymuta.
Transakcja 11145-1424312459597
Pobrano 107534 dostepnosci.
Pobrano 134930 cen.
Usuniecie 4243ID:
37100801579KS
ID:29376
37100801579KS
Tytuł: MW
ISBN: 839176124X
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 37100801579KS .
37100801579KS
MW
Koniec produktu.
Usuniecie 4906ID:
41595401615KS
ID:29376
41595401615KS
Tytuł: Historia polityczna świata XX w t1 1901-1945
ISBN: 8323318522
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.7 kategorii do przypisania.
7Kategorii zapisano.
Zapisano 41595401615KS .
41595401615KS
Historia polityczna świata XX w t1 1901-1945
Koniec produktu.
Usuniecie 4974ID:
41976601579KS
ID:29376
41976601579KS
Tytuł: Salon 2. Alfabet szulerów. Część pierwsza A-L
ISBN: 8360297118
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 41976601579KS .
41976601579KS
Salon 2. Alfabet szulerów. Część pierwsza A-L
Koniec produktu.
Usuniecie 2240ID:
42172001579KS
ID:29376
42172001579KS
Tytuł: Salon 2 Alfabet szulerów
ISBN: 8360297126
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 42172001579KS .
42172001579KS
Salon 2 Alfabet szulerów
Koniec produktu.
Usuniecie 5376ID:
43471102044KS
ID:29376
43471102044KS
Tytuł: Tajemnica Las Meninas
ISBN: 9788389368737
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 43471102044KS .
43471102044KS
Tajemnica Las Meninas
Koniec produktu.
Koniec transakcji.
</code>









share|improve this question
























  • Do you have a store with id 4 in your site?

    – Girish SH
    Feb 19 '15 at 2:55











  • Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

    – Richard Rahl
    Feb 19 '15 at 3:08
















0















I have written a simple script that downloads an XML with product info from a wholesale parse it and save new products or updates exiting ones. It has been working for a few months, but now it's getting really strange. It updates existing products correctly, but it doesn't add a new ones (no error at all) or it overwrites an existing product with the new ones data. I've been trying to find any clue, to debug I output almost any valuable info, but it just won't work.



This is my script:



<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
require_once('Kategorie.php');
$kat = new Kategorie();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');

$xml=simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getdb&id=XX&p=XX") or die("Error: Cannot create object ksiazki");
//$xml=simplexml_load_file("testdb.xml");

$ksiazki = array();
$dostepnosc = array();
$ceny = array();

echo count($xml->books->book)." książek pobrano.<br>";

if (count($xml->books->book) > 0)

foreach ($xml->books->book as $book)

if ($book->attributes()->dzial == "KC")

if ($kat->isIndexHistoric((string)$book->attributes()->indeks))

array_push($ksiazki, $book);

//pobieranie obrazow
$url = "http://services.azymut.pl/oferta/servlet/?mode=getImg&indeks=".$book->attributes()->indeks."&id=XX&p=XX";
$path = dirname(__FILE__)."/media/books/".$book->attributes()->indeks.".jpeg";
$urlFile = "/media/books/".$book->attributes()->indeks.".jpeg";
try

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$img = curl_exec($curl);
curl_close($curl);
$data = imagecreatefromstring($img);
if (isset($data))

imagejpeg($data,$path);


catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());


echo $book->attributes()->indeks.": ".(file_exists($path) ? "Pobrano obrazek.(/media/books/".$book->attributes()->indeks.".jpeg)<br>" : "Brak obrazka w bazie Azymuta.<br>");




$transakcja = $xml->attributes()->transactionId;
echo "Transakcja ".$xml->attributes()->transactionId."<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getAvail&id=XX&p=XX") or die("Error: Cannot create object dostepnosc");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$dostepnosc[$index] = intval($book->attributes()->p);


echo "Pobrano ".count($dostepnosc)." dostepnosci.<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getPrice&id=XX&p=XX") or die("Error: Cannot create object ceny");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$ceny[$index] = $book->attributes()->cena;
$ceny[$index] = 1.30 * $ceny[$index]; //marza 30%
$ceny[$index] = 1.05 * $ceny[$index]; //vat 5%
$ceny[$index] = round($ceny[$index], 1);


echo "Pobrano ".count($ceny)." cen.<br>";

for ($i = 0;$i < count($ksiazki);$i++)
file_exists($path2) ) && $mediaCount == 0 && !$aktualizacja )

$finalPath = ( file_exists($path) ? $path : NULL );
if (!isset($finalPath))

$finalPath = ( file_exists($path2) ? $path : NULL );


if (isset($finalPath))

try

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$product->setMediaGallery (array('images'=>array (), 'values'=>array ()));
$product->addImageToMediaGallery(($finalPath), array('image','small_image','thumbnail'), false, false);
echo "Dodano obrazek.<br>";

catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());



else if ($mediaCount != 0 && ( file_exists($path)


if ($i == count($ksiazki) - 1 || count($xml->books->book) == 0 || count($ksiazki == 0))

//file_get_contents("http://services.azymut.pl/oferta/servlet/?mode=confirm&id=XX&p=XX&transactionId=".$transakcja) or die("Error: Cannot create object confirmation");
echo "Koniec transakcji.<br>";



?>



Why Am I deleting the products at the beginning? It was just one of my blind shots, I wanted to start fresh, but the result was: none of the 500 products has been saved.



And here is the example of the output:



<code>
500 książek pobrano.
37100801579KS: Pobrano obrazek.(/media/books/37100801579KS.jpeg)
41595401615KS: Brak obrazka w bazie Azymuta.
41976601579KS: Pobrano obrazek.(/media/books/41976601579KS.jpeg)
42172001579KS: Pobrano obrazek.(/media/books/42172001579KS.jpeg)
43471102044KS: Brak obrazka w bazie Azymuta.
47354301615KS: Pobrano obrazek.(/media/books/47354301615KS.jpeg)
47359102056KS: Pobrano obrazek.(/media/books/47359102056KS.jpeg)
47495801965KS: Pobrano obrazek.(/media/books/47495801965KS.jpeg)
48445501615KS: Brak obrazka w bazie Azymuta.
49282501184KS: Brak obrazka w bazie Azymuta.
49596001579KS: Pobrano obrazek.(/media/books/49596001579KS.jpeg)
49686001350KS: Pobrano obrazek.(/media/books/49686001350KS.jpeg)
49974001615KS: Pobrano obrazek.(/media/books/49974001615KS.jpeg)
50090000207KS: Pobrano obrazek.(/media/books/50090000207KS.jpeg)
50256601579KS: Pobrano obrazek.(/media/books/50256601579KS.jpeg)
52775100231KS: Pobrano obrazek.(/media/books/52775100231KS.jpeg)
53308401041KS: Pobrano obrazek.(/media/books/53308401041KS.jpeg)
53650002269KS: Brak obrazka w bazie Azymuta.
54326401144KS: Pobrano obrazek.(/media/books/54326401144KS.jpeg)
55247402249KS: Brak obrazka w bazie Azymuta.
55250302062KS: Brak obrazka w bazie Azymuta.
57158801622KS: Pobrano obrazek.(/media/books/57158801622KS.jpeg)
57575602706KS: Pobrano obrazek.(/media/books/57575602706KS.jpeg)
58264602706KS: Pobrano obrazek.(/media/books/58264602706KS.jpeg)
60139002894KS: Pobrano obrazek.(/media/books/60139002894KS.jpeg)
60143302894KS: Pobrano obrazek.(/media/books/60143302894KS.jpeg)
60159902894KS: Pobrano obrazek.(/media/books/60159902894KS.jpeg)
60160802894KS: Pobrano obrazek.(/media/books/60160802894KS.jpeg)
60161202894KS: Brak obrazka w bazie Azymuta.
61274601830KS: Brak obrazka w bazie Azymuta.
61829501075KS: Brak obrazka w bazie Azymuta.
61977702706KS: Brak obrazka w bazie Azymuta.
62104401430KS: Pobrano obrazek.(/media/books/62104401430KS.jpeg)
63614801262KS: Brak obrazka w bazie Azymuta.
64253303114KS: Brak obrazka w bazie Azymuta.
64894500149KS: Brak obrazka w bazie Azymuta.
65196601622KS: Brak obrazka w bazie Azymuta.
65392002743KS: Brak obrazka w bazie Azymuta.
66167802894KS: Brak obrazka w bazie Azymuta.
66338102894KS: Brak obrazka w bazie Azymuta.
66690002894KS: Brak obrazka w bazie Azymuta.
66988102894KS: Brak obrazka w bazie Azymuta.
67454302494KS: Brak obrazka w bazie Azymuta.
67848500153KS: Pobrano obrazek.(/media/books/67848500153KS.jpeg)
68804402044KS: Pobrano obrazek.(/media/books/68804402044KS.jpeg)
70217100206KS: Brak obrazka w bazie Azymuta.
70217400206KS: Brak obrazka w bazie Azymuta.
70227603326KS: Pobrano obrazek.(/media/books/70227603326KS.jpeg)
70341400124KS: Pobrano obrazek.(/media/books/70341400124KS.jpeg)
70360802389KS: Pobrano obrazek.(/media/books/70360802389KS.jpeg)
70362502608KS: Pobrano obrazek.(/media/books/70362502608KS.jpeg)
70486401049KS: Pobrano obrazek.(/media/books/70486401049KS.jpeg)
70491003053KS: Pobrano obrazek.(/media/books/70491003053KS.jpeg)
70491203053KS: Brak obrazka w bazie Azymuta.
70526003143KS: Pobrano obrazek.(/media/books/70526003143KS.jpeg)
70526701252KS: Brak obrazka w bazie Azymuta.
70530302894KS: Brak obrazka w bazie Azymuta.
70550401646KS: Brak obrazka w bazie Azymuta.
70551601405KS: Brak obrazka w bazie Azymuta.
70557401144KS: Brak obrazka w bazie Azymuta.
70559601648KS: Pobrano obrazek.(/media/books/70559601648KS.jpeg)
70649402608KS: Brak obrazka w bazie Azymuta.
70658902608KS: Brak obrazka w bazie Azymuta.
70662201184KS: Brak obrazka w bazie Azymuta.
70682202798KS: Brak obrazka w bazie Azymuta.
70685101549KS: Brak obrazka w bazie Azymuta.
70689500208KS: Pobrano obrazek.(/media/books/70689500208KS.jpeg)
70693701252KS: Brak obrazka w bazie Azymuta.
70695103053KS: Brak obrazka w bazie Azymuta.
70719900208KS: Pobrano obrazek.(/media/books/70719900208KS.jpeg)
70720100208KS: Brak obrazka w bazie Azymuta.
70720200208KS: Pobrano obrazek.(/media/books/70720200208KS.jpeg)
70720400208KS: Pobrano obrazek.(/media/books/70720400208KS.jpeg)
70740003022KS: Pobrano obrazek.(/media/books/70740003022KS.jpeg)
70744600203KS: Pobrano obrazek.(/media/books/70744600203KS.jpeg)
70753403053KS: Pobrano obrazek.(/media/books/70753403053KS.jpeg)
70755102370KS: Pobrano obrazek.(/media/books/70755102370KS.jpeg)
70755302370KS: Pobrano obrazek.(/media/books/70755302370KS.jpeg)
70761603133KS: Brak obrazka w bazie Azymuta.
Transakcja 11145-1424312459597
Pobrano 107534 dostepnosci.
Pobrano 134930 cen.
Usuniecie 4243ID:
37100801579KS
ID:29376
37100801579KS
Tytuł: MW
ISBN: 839176124X
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 37100801579KS .
37100801579KS
MW
Koniec produktu.
Usuniecie 4906ID:
41595401615KS
ID:29376
41595401615KS
Tytuł: Historia polityczna świata XX w t1 1901-1945
ISBN: 8323318522
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.7 kategorii do przypisania.
7Kategorii zapisano.
Zapisano 41595401615KS .
41595401615KS
Historia polityczna świata XX w t1 1901-1945
Koniec produktu.
Usuniecie 4974ID:
41976601579KS
ID:29376
41976601579KS
Tytuł: Salon 2. Alfabet szulerów. Część pierwsza A-L
ISBN: 8360297118
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 41976601579KS .
41976601579KS
Salon 2. Alfabet szulerów. Część pierwsza A-L
Koniec produktu.
Usuniecie 2240ID:
42172001579KS
ID:29376
42172001579KS
Tytuł: Salon 2 Alfabet szulerów
ISBN: 8360297126
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 42172001579KS .
42172001579KS
Salon 2 Alfabet szulerów
Koniec produktu.
Usuniecie 5376ID:
43471102044KS
ID:29376
43471102044KS
Tytuł: Tajemnica Las Meninas
ISBN: 9788389368737
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 43471102044KS .
43471102044KS
Tajemnica Las Meninas
Koniec produktu.
Koniec transakcji.
</code>









share|improve this question
























  • Do you have a store with id 4 in your site?

    – Girish SH
    Feb 19 '15 at 2:55











  • Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

    – Richard Rahl
    Feb 19 '15 at 3:08














0












0








0








I have written a simple script that downloads an XML with product info from a wholesale parse it and save new products or updates exiting ones. It has been working for a few months, but now it's getting really strange. It updates existing products correctly, but it doesn't add a new ones (no error at all) or it overwrites an existing product with the new ones data. I've been trying to find any clue, to debug I output almost any valuable info, but it just won't work.



This is my script:



<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
require_once('Kategorie.php');
$kat = new Kategorie();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');

$xml=simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getdb&id=XX&p=XX") or die("Error: Cannot create object ksiazki");
//$xml=simplexml_load_file("testdb.xml");

$ksiazki = array();
$dostepnosc = array();
$ceny = array();

echo count($xml->books->book)." książek pobrano.<br>";

if (count($xml->books->book) > 0)

foreach ($xml->books->book as $book)

if ($book->attributes()->dzial == "KC")

if ($kat->isIndexHistoric((string)$book->attributes()->indeks))

array_push($ksiazki, $book);

//pobieranie obrazow
$url = "http://services.azymut.pl/oferta/servlet/?mode=getImg&indeks=".$book->attributes()->indeks."&id=XX&p=XX";
$path = dirname(__FILE__)."/media/books/".$book->attributes()->indeks.".jpeg";
$urlFile = "/media/books/".$book->attributes()->indeks.".jpeg";
try

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$img = curl_exec($curl);
curl_close($curl);
$data = imagecreatefromstring($img);
if (isset($data))

imagejpeg($data,$path);


catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());


echo $book->attributes()->indeks.": ".(file_exists($path) ? "Pobrano obrazek.(/media/books/".$book->attributes()->indeks.".jpeg)<br>" : "Brak obrazka w bazie Azymuta.<br>");




$transakcja = $xml->attributes()->transactionId;
echo "Transakcja ".$xml->attributes()->transactionId."<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getAvail&id=XX&p=XX") or die("Error: Cannot create object dostepnosc");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$dostepnosc[$index] = intval($book->attributes()->p);


echo "Pobrano ".count($dostepnosc)." dostepnosci.<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getPrice&id=XX&p=XX") or die("Error: Cannot create object ceny");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$ceny[$index] = $book->attributes()->cena;
$ceny[$index] = 1.30 * $ceny[$index]; //marza 30%
$ceny[$index] = 1.05 * $ceny[$index]; //vat 5%
$ceny[$index] = round($ceny[$index], 1);


echo "Pobrano ".count($ceny)." cen.<br>";

for ($i = 0;$i < count($ksiazki);$i++)
file_exists($path2) ) && $mediaCount == 0 && !$aktualizacja )

$finalPath = ( file_exists($path) ? $path : NULL );
if (!isset($finalPath))

$finalPath = ( file_exists($path2) ? $path : NULL );


if (isset($finalPath))

try

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$product->setMediaGallery (array('images'=>array (), 'values'=>array ()));
$product->addImageToMediaGallery(($finalPath), array('image','small_image','thumbnail'), false, false);
echo "Dodano obrazek.<br>";

catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());



else if ($mediaCount != 0 && ( file_exists($path)


if ($i == count($ksiazki) - 1 || count($xml->books->book) == 0 || count($ksiazki == 0))

//file_get_contents("http://services.azymut.pl/oferta/servlet/?mode=confirm&id=XX&p=XX&transactionId=".$transakcja) or die("Error: Cannot create object confirmation");
echo "Koniec transakcji.<br>";



?>



Why Am I deleting the products at the beginning? It was just one of my blind shots, I wanted to start fresh, but the result was: none of the 500 products has been saved.



And here is the example of the output:



<code>
500 książek pobrano.
37100801579KS: Pobrano obrazek.(/media/books/37100801579KS.jpeg)
41595401615KS: Brak obrazka w bazie Azymuta.
41976601579KS: Pobrano obrazek.(/media/books/41976601579KS.jpeg)
42172001579KS: Pobrano obrazek.(/media/books/42172001579KS.jpeg)
43471102044KS: Brak obrazka w bazie Azymuta.
47354301615KS: Pobrano obrazek.(/media/books/47354301615KS.jpeg)
47359102056KS: Pobrano obrazek.(/media/books/47359102056KS.jpeg)
47495801965KS: Pobrano obrazek.(/media/books/47495801965KS.jpeg)
48445501615KS: Brak obrazka w bazie Azymuta.
49282501184KS: Brak obrazka w bazie Azymuta.
49596001579KS: Pobrano obrazek.(/media/books/49596001579KS.jpeg)
49686001350KS: Pobrano obrazek.(/media/books/49686001350KS.jpeg)
49974001615KS: Pobrano obrazek.(/media/books/49974001615KS.jpeg)
50090000207KS: Pobrano obrazek.(/media/books/50090000207KS.jpeg)
50256601579KS: Pobrano obrazek.(/media/books/50256601579KS.jpeg)
52775100231KS: Pobrano obrazek.(/media/books/52775100231KS.jpeg)
53308401041KS: Pobrano obrazek.(/media/books/53308401041KS.jpeg)
53650002269KS: Brak obrazka w bazie Azymuta.
54326401144KS: Pobrano obrazek.(/media/books/54326401144KS.jpeg)
55247402249KS: Brak obrazka w bazie Azymuta.
55250302062KS: Brak obrazka w bazie Azymuta.
57158801622KS: Pobrano obrazek.(/media/books/57158801622KS.jpeg)
57575602706KS: Pobrano obrazek.(/media/books/57575602706KS.jpeg)
58264602706KS: Pobrano obrazek.(/media/books/58264602706KS.jpeg)
60139002894KS: Pobrano obrazek.(/media/books/60139002894KS.jpeg)
60143302894KS: Pobrano obrazek.(/media/books/60143302894KS.jpeg)
60159902894KS: Pobrano obrazek.(/media/books/60159902894KS.jpeg)
60160802894KS: Pobrano obrazek.(/media/books/60160802894KS.jpeg)
60161202894KS: Brak obrazka w bazie Azymuta.
61274601830KS: Brak obrazka w bazie Azymuta.
61829501075KS: Brak obrazka w bazie Azymuta.
61977702706KS: Brak obrazka w bazie Azymuta.
62104401430KS: Pobrano obrazek.(/media/books/62104401430KS.jpeg)
63614801262KS: Brak obrazka w bazie Azymuta.
64253303114KS: Brak obrazka w bazie Azymuta.
64894500149KS: Brak obrazka w bazie Azymuta.
65196601622KS: Brak obrazka w bazie Azymuta.
65392002743KS: Brak obrazka w bazie Azymuta.
66167802894KS: Brak obrazka w bazie Azymuta.
66338102894KS: Brak obrazka w bazie Azymuta.
66690002894KS: Brak obrazka w bazie Azymuta.
66988102894KS: Brak obrazka w bazie Azymuta.
67454302494KS: Brak obrazka w bazie Azymuta.
67848500153KS: Pobrano obrazek.(/media/books/67848500153KS.jpeg)
68804402044KS: Pobrano obrazek.(/media/books/68804402044KS.jpeg)
70217100206KS: Brak obrazka w bazie Azymuta.
70217400206KS: Brak obrazka w bazie Azymuta.
70227603326KS: Pobrano obrazek.(/media/books/70227603326KS.jpeg)
70341400124KS: Pobrano obrazek.(/media/books/70341400124KS.jpeg)
70360802389KS: Pobrano obrazek.(/media/books/70360802389KS.jpeg)
70362502608KS: Pobrano obrazek.(/media/books/70362502608KS.jpeg)
70486401049KS: Pobrano obrazek.(/media/books/70486401049KS.jpeg)
70491003053KS: Pobrano obrazek.(/media/books/70491003053KS.jpeg)
70491203053KS: Brak obrazka w bazie Azymuta.
70526003143KS: Pobrano obrazek.(/media/books/70526003143KS.jpeg)
70526701252KS: Brak obrazka w bazie Azymuta.
70530302894KS: Brak obrazka w bazie Azymuta.
70550401646KS: Brak obrazka w bazie Azymuta.
70551601405KS: Brak obrazka w bazie Azymuta.
70557401144KS: Brak obrazka w bazie Azymuta.
70559601648KS: Pobrano obrazek.(/media/books/70559601648KS.jpeg)
70649402608KS: Brak obrazka w bazie Azymuta.
70658902608KS: Brak obrazka w bazie Azymuta.
70662201184KS: Brak obrazka w bazie Azymuta.
70682202798KS: Brak obrazka w bazie Azymuta.
70685101549KS: Brak obrazka w bazie Azymuta.
70689500208KS: Pobrano obrazek.(/media/books/70689500208KS.jpeg)
70693701252KS: Brak obrazka w bazie Azymuta.
70695103053KS: Brak obrazka w bazie Azymuta.
70719900208KS: Pobrano obrazek.(/media/books/70719900208KS.jpeg)
70720100208KS: Brak obrazka w bazie Azymuta.
70720200208KS: Pobrano obrazek.(/media/books/70720200208KS.jpeg)
70720400208KS: Pobrano obrazek.(/media/books/70720400208KS.jpeg)
70740003022KS: Pobrano obrazek.(/media/books/70740003022KS.jpeg)
70744600203KS: Pobrano obrazek.(/media/books/70744600203KS.jpeg)
70753403053KS: Pobrano obrazek.(/media/books/70753403053KS.jpeg)
70755102370KS: Pobrano obrazek.(/media/books/70755102370KS.jpeg)
70755302370KS: Pobrano obrazek.(/media/books/70755302370KS.jpeg)
70761603133KS: Brak obrazka w bazie Azymuta.
Transakcja 11145-1424312459597
Pobrano 107534 dostepnosci.
Pobrano 134930 cen.
Usuniecie 4243ID:
37100801579KS
ID:29376
37100801579KS
Tytuł: MW
ISBN: 839176124X
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 37100801579KS .
37100801579KS
MW
Koniec produktu.
Usuniecie 4906ID:
41595401615KS
ID:29376
41595401615KS
Tytuł: Historia polityczna świata XX w t1 1901-1945
ISBN: 8323318522
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.7 kategorii do przypisania.
7Kategorii zapisano.
Zapisano 41595401615KS .
41595401615KS
Historia polityczna świata XX w t1 1901-1945
Koniec produktu.
Usuniecie 4974ID:
41976601579KS
ID:29376
41976601579KS
Tytuł: Salon 2. Alfabet szulerów. Część pierwsza A-L
ISBN: 8360297118
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 41976601579KS .
41976601579KS
Salon 2. Alfabet szulerów. Część pierwsza A-L
Koniec produktu.
Usuniecie 2240ID:
42172001579KS
ID:29376
42172001579KS
Tytuł: Salon 2 Alfabet szulerów
ISBN: 8360297126
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 42172001579KS .
42172001579KS
Salon 2 Alfabet szulerów
Koniec produktu.
Usuniecie 5376ID:
43471102044KS
ID:29376
43471102044KS
Tytuł: Tajemnica Las Meninas
ISBN: 9788389368737
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 43471102044KS .
43471102044KS
Tajemnica Las Meninas
Koniec produktu.
Koniec transakcji.
</code>









share|improve this question
















I have written a simple script that downloads an XML with product info from a wholesale parse it and save new products or updates exiting ones. It has been working for a few months, but now it's getting really strange. It updates existing products correctly, but it doesn't add a new ones (no error at all) or it overwrites an existing product with the new ones data. I've been trying to find any clue, to debug I output almost any valuable info, but it just won't work.



This is my script:



<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();
require_once('Kategorie.php');
$kat = new Kategorie();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');

$xml=simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getdb&id=XX&p=XX") or die("Error: Cannot create object ksiazki");
//$xml=simplexml_load_file("testdb.xml");

$ksiazki = array();
$dostepnosc = array();
$ceny = array();

echo count($xml->books->book)." książek pobrano.<br>";

if (count($xml->books->book) > 0)

foreach ($xml->books->book as $book)

if ($book->attributes()->dzial == "KC")

if ($kat->isIndexHistoric((string)$book->attributes()->indeks))

array_push($ksiazki, $book);

//pobieranie obrazow
$url = "http://services.azymut.pl/oferta/servlet/?mode=getImg&indeks=".$book->attributes()->indeks."&id=XX&p=XX";
$path = dirname(__FILE__)."/media/books/".$book->attributes()->indeks.".jpeg";
$urlFile = "/media/books/".$book->attributes()->indeks.".jpeg";
try

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$img = curl_exec($curl);
curl_close($curl);
$data = imagecreatefromstring($img);
if (isset($data))

imagejpeg($data,$path);


catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());


echo $book->attributes()->indeks.": ".(file_exists($path) ? "Pobrano obrazek.(/media/books/".$book->attributes()->indeks.".jpeg)<br>" : "Brak obrazka w bazie Azymuta.<br>");




$transakcja = $xml->attributes()->transactionId;
echo "Transakcja ".$xml->attributes()->transactionId."<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getAvail&id=XX&p=XX") or die("Error: Cannot create object dostepnosc");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$dostepnosc[$index] = intval($book->attributes()->p);


echo "Pobrano ".count($dostepnosc)." dostepnosci.<br>";

$xml2 = simplexml_load_file("http://services.azymut.pl/oferta/servlet/?mode=getPrice&id=XX&p=XX") or die("Error: Cannot create object ceny");

foreach ($xml2->book as $book)

$index = (string)$book->attributes()->indeks;
$ceny[$index] = $book->attributes()->cena;
$ceny[$index] = 1.30 * $ceny[$index]; //marza 30%
$ceny[$index] = 1.05 * $ceny[$index]; //vat 5%
$ceny[$index] = round($ceny[$index], 1);


echo "Pobrano ".count($ceny)." cen.<br>";

for ($i = 0;$i < count($ksiazki);$i++)
file_exists($path2) ) && $mediaCount == 0 && !$aktualizacja )

$finalPath = ( file_exists($path) ? $path : NULL );
if (!isset($finalPath))

$finalPath = ( file_exists($path2) ? $path : NULL );


if (isset($finalPath))

try

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$product->setMediaGallery (array('images'=>array (), 'values'=>array ()));
$product->addImageToMediaGallery(($finalPath), array('image','small_image','thumbnail'), false, false);
echo "Dodano obrazek.<br>";

catch(Exception $e)

echo "MagentoError: ".$e->getMessage();
Mage::log($e->getMessage());



else if ($mediaCount != 0 && ( file_exists($path)


if ($i == count($ksiazki) - 1 || count($xml->books->book) == 0 || count($ksiazki == 0))

//file_get_contents("http://services.azymut.pl/oferta/servlet/?mode=confirm&id=XX&p=XX&transactionId=".$transakcja) or die("Error: Cannot create object confirmation");
echo "Koniec transakcji.<br>";



?>



Why Am I deleting the products at the beginning? It was just one of my blind shots, I wanted to start fresh, but the result was: none of the 500 products has been saved.



And here is the example of the output:



<code>
500 książek pobrano.
37100801579KS: Pobrano obrazek.(/media/books/37100801579KS.jpeg)
41595401615KS: Brak obrazka w bazie Azymuta.
41976601579KS: Pobrano obrazek.(/media/books/41976601579KS.jpeg)
42172001579KS: Pobrano obrazek.(/media/books/42172001579KS.jpeg)
43471102044KS: Brak obrazka w bazie Azymuta.
47354301615KS: Pobrano obrazek.(/media/books/47354301615KS.jpeg)
47359102056KS: Pobrano obrazek.(/media/books/47359102056KS.jpeg)
47495801965KS: Pobrano obrazek.(/media/books/47495801965KS.jpeg)
48445501615KS: Brak obrazka w bazie Azymuta.
49282501184KS: Brak obrazka w bazie Azymuta.
49596001579KS: Pobrano obrazek.(/media/books/49596001579KS.jpeg)
49686001350KS: Pobrano obrazek.(/media/books/49686001350KS.jpeg)
49974001615KS: Pobrano obrazek.(/media/books/49974001615KS.jpeg)
50090000207KS: Pobrano obrazek.(/media/books/50090000207KS.jpeg)
50256601579KS: Pobrano obrazek.(/media/books/50256601579KS.jpeg)
52775100231KS: Pobrano obrazek.(/media/books/52775100231KS.jpeg)
53308401041KS: Pobrano obrazek.(/media/books/53308401041KS.jpeg)
53650002269KS: Brak obrazka w bazie Azymuta.
54326401144KS: Pobrano obrazek.(/media/books/54326401144KS.jpeg)
55247402249KS: Brak obrazka w bazie Azymuta.
55250302062KS: Brak obrazka w bazie Azymuta.
57158801622KS: Pobrano obrazek.(/media/books/57158801622KS.jpeg)
57575602706KS: Pobrano obrazek.(/media/books/57575602706KS.jpeg)
58264602706KS: Pobrano obrazek.(/media/books/58264602706KS.jpeg)
60139002894KS: Pobrano obrazek.(/media/books/60139002894KS.jpeg)
60143302894KS: Pobrano obrazek.(/media/books/60143302894KS.jpeg)
60159902894KS: Pobrano obrazek.(/media/books/60159902894KS.jpeg)
60160802894KS: Pobrano obrazek.(/media/books/60160802894KS.jpeg)
60161202894KS: Brak obrazka w bazie Azymuta.
61274601830KS: Brak obrazka w bazie Azymuta.
61829501075KS: Brak obrazka w bazie Azymuta.
61977702706KS: Brak obrazka w bazie Azymuta.
62104401430KS: Pobrano obrazek.(/media/books/62104401430KS.jpeg)
63614801262KS: Brak obrazka w bazie Azymuta.
64253303114KS: Brak obrazka w bazie Azymuta.
64894500149KS: Brak obrazka w bazie Azymuta.
65196601622KS: Brak obrazka w bazie Azymuta.
65392002743KS: Brak obrazka w bazie Azymuta.
66167802894KS: Brak obrazka w bazie Azymuta.
66338102894KS: Brak obrazka w bazie Azymuta.
66690002894KS: Brak obrazka w bazie Azymuta.
66988102894KS: Brak obrazka w bazie Azymuta.
67454302494KS: Brak obrazka w bazie Azymuta.
67848500153KS: Pobrano obrazek.(/media/books/67848500153KS.jpeg)
68804402044KS: Pobrano obrazek.(/media/books/68804402044KS.jpeg)
70217100206KS: Brak obrazka w bazie Azymuta.
70217400206KS: Brak obrazka w bazie Azymuta.
70227603326KS: Pobrano obrazek.(/media/books/70227603326KS.jpeg)
70341400124KS: Pobrano obrazek.(/media/books/70341400124KS.jpeg)
70360802389KS: Pobrano obrazek.(/media/books/70360802389KS.jpeg)
70362502608KS: Pobrano obrazek.(/media/books/70362502608KS.jpeg)
70486401049KS: Pobrano obrazek.(/media/books/70486401049KS.jpeg)
70491003053KS: Pobrano obrazek.(/media/books/70491003053KS.jpeg)
70491203053KS: Brak obrazka w bazie Azymuta.
70526003143KS: Pobrano obrazek.(/media/books/70526003143KS.jpeg)
70526701252KS: Brak obrazka w bazie Azymuta.
70530302894KS: Brak obrazka w bazie Azymuta.
70550401646KS: Brak obrazka w bazie Azymuta.
70551601405KS: Brak obrazka w bazie Azymuta.
70557401144KS: Brak obrazka w bazie Azymuta.
70559601648KS: Pobrano obrazek.(/media/books/70559601648KS.jpeg)
70649402608KS: Brak obrazka w bazie Azymuta.
70658902608KS: Brak obrazka w bazie Azymuta.
70662201184KS: Brak obrazka w bazie Azymuta.
70682202798KS: Brak obrazka w bazie Azymuta.
70685101549KS: Brak obrazka w bazie Azymuta.
70689500208KS: Pobrano obrazek.(/media/books/70689500208KS.jpeg)
70693701252KS: Brak obrazka w bazie Azymuta.
70695103053KS: Brak obrazka w bazie Azymuta.
70719900208KS: Pobrano obrazek.(/media/books/70719900208KS.jpeg)
70720100208KS: Brak obrazka w bazie Azymuta.
70720200208KS: Pobrano obrazek.(/media/books/70720200208KS.jpeg)
70720400208KS: Pobrano obrazek.(/media/books/70720400208KS.jpeg)
70740003022KS: Pobrano obrazek.(/media/books/70740003022KS.jpeg)
70744600203KS: Pobrano obrazek.(/media/books/70744600203KS.jpeg)
70753403053KS: Pobrano obrazek.(/media/books/70753403053KS.jpeg)
70755102370KS: Pobrano obrazek.(/media/books/70755102370KS.jpeg)
70755302370KS: Pobrano obrazek.(/media/books/70755302370KS.jpeg)
70761603133KS: Brak obrazka w bazie Azymuta.
Transakcja 11145-1424312459597
Pobrano 107534 dostepnosci.
Pobrano 134930 cen.
Usuniecie 4243ID:
37100801579KS
ID:29376
37100801579KS
Tytuł: MW
ISBN: 839176124X
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 37100801579KS .
37100801579KS
MW
Koniec produktu.
Usuniecie 4906ID:
41595401615KS
ID:29376
41595401615KS
Tytuł: Historia polityczna świata XX w t1 1901-1945
ISBN: 8323318522
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.7 kategorii do przypisania.
7Kategorii zapisano.
Zapisano 41595401615KS .
41595401615KS
Historia polityczna świata XX w t1 1901-1945
Koniec produktu.
Usuniecie 4974ID:
41976601579KS
ID:29376
41976601579KS
Tytuł: Salon 2. Alfabet szulerów. Część pierwsza A-L
ISBN: 8360297118
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 41976601579KS .
41976601579KS
Salon 2. Alfabet szulerów. Część pierwsza A-L
Koniec produktu.
Usuniecie 2240ID:
42172001579KS
ID:29376
42172001579KS
Tytuł: Salon 2 Alfabet szulerów
ISBN: 8360297126
Debug: Path - TRUE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
Dodano obrazek.
3 kategorii do przypisania.
3Kategorii zapisano.
Zapisano 42172001579KS .
42172001579KS
Salon 2 Alfabet szulerów
Koniec produktu.
Usuniecie 5376ID:
43471102044KS
ID:29376
43471102044KS
Tytuł: Tajemnica Las Meninas
ISBN: 9788389368737
Debug: Path - FALSE Path2 - TRUE Liczba obrazkow - 0 Aktualizacja - FALSE
MagentoError: Image does not exist.2 kategorii do przypisania.
2Kategorii zapisano.
Zapisano 43471102044KS .
43471102044KS
Tajemnica Las Meninas
Koniec produktu.
Koniec transakcji.
</code>






php products script






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 37 mins ago









Teja Bhagavan Kollepara

3,00641949




3,00641949










asked Feb 19 '15 at 2:50









Richard RahlRichard Rahl

11




11












  • Do you have a store with id 4 in your site?

    – Girish SH
    Feb 19 '15 at 2:55











  • Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

    – Richard Rahl
    Feb 19 '15 at 3:08


















  • Do you have a store with id 4 in your site?

    – Girish SH
    Feb 19 '15 at 2:55











  • Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

    – Richard Rahl
    Feb 19 '15 at 3:08

















Do you have a store with id 4 in your site?

– Girish SH
Feb 19 '15 at 2:55





Do you have a store with id 4 in your site?

– Girish SH
Feb 19 '15 at 2:55













Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

– Richard Rahl
Feb 19 '15 at 3:08






Yes, but it doesn't work on any ID and even if I comment this line. Note one weird fact: every "saved" object in this example output has exactly the same ID. I dont know why. It's this line for example: 41976601579KS ID:29376 <- this is the ID of every product and it's the same! 41976601579KS

– Richard Rahl
Feb 19 '15 at 3:08











1 Answer
1






active

oldest

votes


















1














I can't run this since I don't have your XML or the rest of your code but based on what you've described as your problem one thing stands out to me.



Starting here:



 echo "ID:".$product->getIdBySku($index)."<br>";

//// I get this part because you're loading your existing product.

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


//// This part is redundant. You're doing this again below after this section.

$product->setSku($index)->setIsbn($ksiazki[$i]->isbn)->setName($ksiazki[$i]->tytul)->save();
$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
echo $product->getSku()."<br>";
echo "ID:".$product->getIdBySku($index)."<br>";



Try replacing the code above with this:



 echo "ID:".$product->getIdBySku($index)."<br>";

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


$product = Mage::getModel('catalog/product');







share|improve this answer

























  • It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

    – Richard Rahl
    Feb 19 '15 at 16:56











  • Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

    – Richard Rahl
    Feb 19 '15 at 17:01











  • You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

    – seanbreeden
    Feb 19 '15 at 17:12











  • Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

    – Richard Rahl
    Feb 19 '15 at 18:37










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f57789%2fcannot-add-new-products-or-they-get-mixed-up-with-updated-ones-no-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I can't run this since I don't have your XML or the rest of your code but based on what you've described as your problem one thing stands out to me.



Starting here:



 echo "ID:".$product->getIdBySku($index)."<br>";

//// I get this part because you're loading your existing product.

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


//// This part is redundant. You're doing this again below after this section.

$product->setSku($index)->setIsbn($ksiazki[$i]->isbn)->setName($ksiazki[$i]->tytul)->save();
$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
echo $product->getSku()."<br>";
echo "ID:".$product->getIdBySku($index)."<br>";



Try replacing the code above with this:



 echo "ID:".$product->getIdBySku($index)."<br>";

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


$product = Mage::getModel('catalog/product');







share|improve this answer

























  • It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

    – Richard Rahl
    Feb 19 '15 at 16:56











  • Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

    – Richard Rahl
    Feb 19 '15 at 17:01











  • You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

    – seanbreeden
    Feb 19 '15 at 17:12











  • Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

    – Richard Rahl
    Feb 19 '15 at 18:37















1














I can't run this since I don't have your XML or the rest of your code but based on what you've described as your problem one thing stands out to me.



Starting here:



 echo "ID:".$product->getIdBySku($index)."<br>";

//// I get this part because you're loading your existing product.

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


//// This part is redundant. You're doing this again below after this section.

$product->setSku($index)->setIsbn($ksiazki[$i]->isbn)->setName($ksiazki[$i]->tytul)->save();
$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
echo $product->getSku()."<br>";
echo "ID:".$product->getIdBySku($index)."<br>";



Try replacing the code above with this:



 echo "ID:".$product->getIdBySku($index)."<br>";

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


$product = Mage::getModel('catalog/product');







share|improve this answer

























  • It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

    – Richard Rahl
    Feb 19 '15 at 16:56











  • Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

    – Richard Rahl
    Feb 19 '15 at 17:01











  • You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

    – seanbreeden
    Feb 19 '15 at 17:12











  • Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

    – Richard Rahl
    Feb 19 '15 at 18:37













1












1








1







I can't run this since I don't have your XML or the rest of your code but based on what you've described as your problem one thing stands out to me.



Starting here:



 echo "ID:".$product->getIdBySku($index)."<br>";

//// I get this part because you're loading your existing product.

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


//// This part is redundant. You're doing this again below after this section.

$product->setSku($index)->setIsbn($ksiazki[$i]->isbn)->setName($ksiazki[$i]->tytul)->save();
$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
echo $product->getSku()."<br>";
echo "ID:".$product->getIdBySku($index)."<br>";



Try replacing the code above with this:



 echo "ID:".$product->getIdBySku($index)."<br>";

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


$product = Mage::getModel('catalog/product');







share|improve this answer















I can't run this since I don't have your XML or the rest of your code but based on what you've described as your problem one thing stands out to me.



Starting here:



 echo "ID:".$product->getIdBySku($index)."<br>";

//// I get this part because you're loading your existing product.

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


//// This part is redundant. You're doing this again below after this section.

$product->setSku($index)->setIsbn($ksiazki[$i]->isbn)->setName($ksiazki[$i]->tytul)->save();
$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
echo $product->getSku()."<br>";
echo "ID:".$product->getIdBySku($index)."<br>";



Try replacing the code above with this:



 echo "ID:".$product->getIdBySku($index)."<br>";

if($product->getIdBySku($index) != NULL)

$product = Mage::getModel('catalog/product')->load($product->getIdBySku($index));
$mediaCount = count($product->getMediaGalleryImages());
$date = date('d/m/Y h:i:s', strtotime($product->getCreatedAt()));

$aktualizacja = TRUE;
echo "Książka już istnieje, następuje nadpisywanie. Liczba obrazków książki to: ".$mediaCount.".<br>";


else


$product = Mage::getModel('catalog/product');








share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 22 '15 at 6:05









Keyul Shah

6,57963058




6,57963058










answered Feb 19 '15 at 3:58









seanbreedenseanbreeden

2,7041323




2,7041323












  • It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

    – Richard Rahl
    Feb 19 '15 at 16:56











  • Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

    – Richard Rahl
    Feb 19 '15 at 17:01











  • You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

    – seanbreeden
    Feb 19 '15 at 17:12











  • Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

    – Richard Rahl
    Feb 19 '15 at 18:37

















  • It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

    – Richard Rahl
    Feb 19 '15 at 16:56











  • Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

    – Richard Rahl
    Feb 19 '15 at 17:01











  • You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

    – seanbreeden
    Feb 19 '15 at 17:12











  • Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

    – Richard Rahl
    Feb 19 '15 at 18:37
















It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

– Richard Rahl
Feb 19 '15 at 16:56





It looks like it worked, the product has been added. That's funny because this "else" was added when I tried to figure this problem out, before I posted here. : D Anyway, there is one problem now, the photos are loaded into the product, but they are not "checked" as base, small and thumbnail. Strange.

– Richard Rahl
Feb 19 '15 at 16:56













Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

– Richard Rahl
Feb 19 '15 at 17:01





Oh, no I have examined this further and the products are saved, but they are mixed up? When I look for SKU of one book in magento backend, there is completly another book with that SKU.

– Richard Rahl
Feb 19 '15 at 17:01













You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

– seanbreeden
Feb 19 '15 at 17:12





You do need that else. If not then it will save incorrectly. Try re-adding it exactly how I had it in my answer.

– seanbreeden
Feb 19 '15 at 17:12













Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

– Richard Rahl
Feb 19 '15 at 18:37





Still some of the products are mixed up, what I mean is: there are a few exactly identical products, but with a different SKU, although they were saved as 2 different products (I'm sure, because I echo all the essential values during the process). Also the images are saved, but they are not "checked" as base image, small image and thumbnail - the effect is they have no image in the frontend.

– Richard Rahl
Feb 19 '15 at 18:37

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f57789%2fcannot-add-new-products-or-they-get-mixed-up-with-updated-ones-no-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2