Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Яндекс.Маркет XML


Izrajk
 Share

Recommended Posts

Добрый день, 

Имеется модуль Y.CMS от Яндекс.Кассы, нужно отдельно добавить в выгрузку xml производителя с ценами меньше 20000, при том, что все товары меньше 20к

имеют quantity=0, а если они 0, то они не добавляются в xml

 

catalog/controller/feed/yamarket.php

 

elseif ($this->config->get('ya_market_set_available') == 3)
			{
				$available = true;
				if (($product['quantity'] == 0) || (($product['manufacturer_id'] == 12 && $product['price'] > 20000) || ($product['manufacturer_id'] == 30 && $product['price'] > 20000)))  continue;
			}

Такая запись работала, если у товара quantity был не 0. 

Не понимаю, что сделать, чтобы к примеру товар с quantity=0, manufacturer_id= 12, price=12045, выгрузился в xml

Есть у кого идеи? 

Link to comment
Share on other sites


  • 4 weeks later...

Зачем вы это проверяете: 

elseif ($this->config->get('ya_market_set_available') == 3) {

Это проверка на срок доставки в пункт самовывоза.

Нужно именно для срока самовывоза?

Вот есть код раньше:

foreach ($products as $product) {
            if ($this->config->get('yandex_money_market_available') && $product['quantity'] < 1) {
                continue;
            }

Надо тут менять.

continue значит, что дальше не пойдет проверять, а возьмет новый товар

до этого:

elseif ($this->config->get('ya_market_set_available') == 3) {

не дойдет

Edited by SergeyProgr
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.