vponomarev / ngcms-plugins

10 stars 6 forks source link

Basket не достает цену из xfields table #5

Closed stdex closed 8 years ago

stdex commented 9 years ago

https://github.com/vponomarev/ngcms-plugins/blob/master/basket/lib/librpc.php#L130 Массив $rec возвращает сериализованное поле xfields

Надо так:

                $xc = xf_configLoad();
                $xfData = xf_decode($nrec['xfields']);
                $xfTData = unserialize($rec['xfields']);

                // Get price
                if (pluginGetVariable('basket', 'ntable_price') && isset($xfTData[pluginGetVariable('basket', 'ntable_price')])) {
                    $price = $xfTData[pluginGetVariable('basket', 'ntable_price')];
                } else {
                    $price = 0;
                }