Skip to content

Instantly share code, notes, and snippets.

@ircykk
Last active September 7, 2018 09:18
Show Gist options
  • Save ircykk/465f6465eecdc91c232a29033be9c214 to your computer and use it in GitHub Desktop.
Save ircykk/465f6465eecdc91c232a29033be9c214 to your computer and use it in GitHub Desktop.
AllegroSyncManager.php
: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