Created
June 8, 2020 10:57
-
-
Save gregzawadzki/5e0da2c263b8bda96b834d5c3ba1f805 to your computer and use it in GitHub Desktop.
PriceWars II Custom function offer splitter
This file contains hidden or 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
<?php | |
// Custom Function dla modułui PriceWars II | |
// https://pl.seigi.eu/modul-prestashop/pricewars2.html | |
// Skrypt pozwala na automatycznie rozdzielenie oferty na 2 XML | |
function pricewars2_product(\pricewars2\product $product, $id_xml, $id_lang, $service, $settings, $module){ | |
if($id_xml == 1 && $product->id_presta <= 9000){ | |
throw new \pricewars2\pricewarsSkipException('Produkt ze starej oferty'); | |
} | |
if($id_xml == 2 && $product->id_presta > 9000){ | |
throw new \pricewars2\pricewarsSkipException('Produkt z nowej oferty'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment