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

Достать все товары для Hotline (getProducts)


Recommended Posts

ранее доставались только имеющиеся товары

$products = $this->model_catalog_product->getProducts(array('start' => 0, 'available' => 1, 'limit' => 1000000));

и выводились на екран 

if ($product['quantity']) {
                        $output .= '<stock>' . $this->language->get('text_in_stock') . '</stock>';
                    } else {
                        $output .= '<stock>' . $this->language->get('text_out_of_stock') . '</stock>';

я хочу изменить на то, чтобы доставать все товары и в зависимости от того нет ли есть выводить в прайс нужное мне сообщение. сделал так

$products = $this->model_catalog_product->getProducts();

вывожу так

// if ($product ['status'] != 1 ) {
            //            $output .= '<stock>' . $this->language->get('text_in_stock') . '</stock>';
            //        } else {
            //            $output .= '<stock days="10" >' . $this->language->get('text_out_of_stock') . '</stock>';
            //        }
     if ($product ['stock_status'] !='Нет в наличии') {
                        $output .= '<stock>' . $this->language->get('text_in_stock') . '</stock>';
                    } else {
                        $output .= '<stock days="10" >' . $this->language->get('text_out_of_stock') . '</stock>';

при обоих вариантах выдает ошибку

This page contains the following errors:

error on line 6209 at column 80109: StartTag: invalid element name

Below is a rendering of the page up to the first error.

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

  • 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.