Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridouchire/6984ef0bb63bab97a61306a787c604b7 to your computer and use it in GitHub Desktop.
Save ridouchire/6984ef0bb63bab97a61306a787c604b7 to your computer and use it in GitHub Desktop.
diff --git a/app/addons/yml_export/Tygh/Ym/Yml2.php b/app/addons/yml_export/Tygh/Ym/Yml2.php
index 67f596f4e8..525eb2e14a 100644
--- a/app/addons/yml_export/Tygh/Ym/Yml2.php
+++ b/app/addons/yml_export/Tygh/Ym/Yml2.php
@@ -281,6 +281,7 @@ class Yml2 implements IYml2
$this->head($file);
$this->buildCategories($file_categories);
} else {
+ $this->setCategoriesCurrentId(fn_get_storage_data('yml2_categories_current_id'));
$this->available_categories = $this->getAvailableCategories();
$xml_strings[] = trim(fgets($file_categories));
@@ -1118,6 +1119,7 @@ class Yml2 implements IYml2
$offers_count += count($products);
fn_set_storage_data('yml2_export_offset_' . $this->price_id, $this->offset);
+ fn_set_storage_data('yml2_categories_current_id', $this->categories_current_id);
if (!defined('CONSOLE') && $offers_count >= self::ITERATION_OFFERS) {
fn_set_storage_data('yml2_product_export_' . $this->price_id, $this->yml2_product_export);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment