Last active
September 7, 2018 09:18
-
-
Save ircykk/465f6465eecdc91c232a29033be9c214 to your computer and use it in GitHub Desktop.
AllegroSyncManager.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:1687 | |
// Common theme images | |
if ($allegroProduct->id_allegro_theme >= 0) { | |
// ... | |
} | |
// dodajemy ten kod | |
foreach (AFField::$FID_IMAGES as $i => $fieldId) { | |
// jesli slot na zdjecie pusty - dodajemy zdjecie | |
if (!$fieldBuilder->getField($fieldId)) { | |
// zdjecie w zalenosci od id produktu etc. | |
if ($allegroProduct->product->id_product === 123) { | |
$imageContent = file_get_contents(...); | |
// dpdajemy | |
$imageList['THEME'][] = $fieldId; | |
} | |
$fieldBuilder->addField($fieldId, base64_encode($imageContent)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment