Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 4 Ответов
  • 3966 Просмотров
*

CrazyPedro

  • Осваиваюсь на форуме
  • 14
  • 0 / 0
  • Только Учусь
Подскажите есть у кого product.php для VM 3.0.4  (Cherry Picker 3.7) Или инструкция, с ног сбился не могу найти.
Извините если не туда тему оформил!
*

alexfom_16

  • Захожу иногда
  • 257
  • 24 / 0
Рекомендую хостинг Beget.ru
Качественная настройка и ведение Яндекс.Директ.
*

Carlsson

  • Новичок
  • 1
  • 0 / 0
Re: product.php для VM 3.0.4 (Cherry Picker 3.7)
« Ответ #2 : 23.04.2015, 16:18:56 »
У меня такое же сочетание. Не могу понять, вроде для VM 3 уже ничего менять не надо. Но вот для CP не понятно...на сайте написано начиная с 3.8, а значит 3.7 надо как то подружить с VM 3.
*

garabec

  • Новичок
  • 8
  • 0 / 0
Re: product.php для VM 3.0.4 (Cherry Picker 3.7)
« Ответ #3 : 12.10.2015, 12:12:13 »
Та же фигня.
Если стоит Cherry Picker Product Types версией ДО 3.8, то нужно вносить правки в файл  product.php
Включить фильтрацию по цене получается. А запустить фильтрацию по полям фильтра не получается.
*

garabec

  • Новичок
  • 8
  • 0 / 0
Re: product.php для VM 3.0.4 (Cherry Picker 3.7)
« Ответ #4 : 16.10.2015, 18:33:21 »
Короче есть решение!
у меня, по крайней мере, работает:
Нужно внести изминения в файл
/administrator/components/com_virtuemart/models/product.php

После кода:
               $joinShopper = TRUE;
            }
         }
Вставляем:
// galt: begin edit 1 of 6
         $additionalTableJoins = '';
         $useDefaultVMManufacturers = true;
         if ((isset($isSite) && $isSite) || $app->isSite()) {
            $cp_added_prices = false;
            // ----------------------------------
            // Cherry Picker Product Types 3
            // ----------------------------------
            $cpProductTypesHelper = JPATH_BASE .'/modules/mod_vm_cherry_picker/helpers/vmFilterProcessor.php';
            if (file_exists($cpProductTypesHelper)) {
               require_once($cpProductTypesHelper);
               $prices = VMFilterProcessorPT::getPriceSelection();
               if ($prices) {
                  // New, more sophisticated way to search by prices
                  if (is_array($prices)) {
                     $additionalTableJoins .= ' '. $prices['join'];
                     $where[] = $prices['where'];
                     if ($prices['join_manufacturers'])
                        $joinMf = true;
                  } else {
                     $where[] = $prices;
                  }

                  $joinPrice = true;
                  $cp_added_prices = true;
               }

               $filtersData = VMFilterProcessorPT::getFilterSelection();
               if ($filtersData) {
                  $where[] = $filtersData['where'];
                  $additionalTableJoins .= ' '. $filtersData['join'];

                  //$_SESSION['pt_filters_where'] = $filtersData['where'];
                  //$_SESSION['pt_filters_join'] = $filtersData['join'];
               } else {
                  //$_SESSION['pt_filters_where'] = null;
                  //$_SESSION['pt_filters_join'] = null;
               }

               if (method_exists('VMFilterProcessorPT', 'getManufacturersSelection')) {
                  $manufacturers = VMFilterProcessorPT::getManufacturersSelection();
                  if ($manufacturers) {
                     $where[] = $manufacturers;
                     $joinMf = true;
                     $useDefaultVMManufacturers = false;
                  }
               }
            }


            // ----------------------------------
            // Cherry Picker Custom Fields 2
            // ----------------------------------
            $cpCustomFieldsHelper = JPATH_BASE .'/modules/mod_vm_cherry_picker_cf/helpers/vmFilterProcessor.php';
            if (file_exists($cpCustomFieldsHelper)) {
               require_once($cpCustomFieldsHelper);
               // If there are CF and PT versions of CP on page, process prices just once
               if ( !$cp_added_prices && ($prices = VMFilterProcessorCF::getPriceSelection())) {
                  // New, more sophisticated way to search by prices
                  if (is_array($prices)) {
                     $additionalTableJoins .= ' '. $prices['join'];
                     $where[] = $prices['where'];
                     if ($prices['join_manufacturers'])
                        $joinMf = true;
                  } else {
                     $where[] = $prices;
                  }
                  $joinPrice = true;
               }

               $join = VMFilterProcessorCF::getFilterSelection();
               if ($join)
                  $additionalTableJoins .= ' '. $join;
               //$_SESSION['cf_filters_join'] = $join;
               // If manufacturers weren't processed by PT version
               if ($useDefaultVMManufacturers &&
                  method_exists('VMFilterProcessorCF', 'getManufacturersSelection')) {
                  $manufacturers = VMFilterProcessorCF::getManufacturersSelection();
                  if ($manufacturers) {
                     $where[] = $manufacturers;
                     $joinMf = true;
                     $useDefaultVMManufacturers = false;
                  }
               }
            }
         }
         // galt: end edit 1

         // galt: edit 2 of 6
         // We use Cherry Picker's method for front-end as it is able
         // to manage multiple Manufacturers selection
         if ($this->virtuemart_manufacturer_id && $useDefaultVMManufacturers) {
            $joinMf = true ;
            $where[] = ' `#__virtuemart_product_manufacturers`.`virtuemart_manufacturer_id` = '.$this->virtuemart_manufacturer_id;
         }

ПЕРЕД
if (count ($where) > 0) {
         $whereString = ' WHERE (' . implode ("\n AND ", $where). ') ';
      }
вставляем:
      // galt: edit 3 of 6
      // Include additional table JOINs
      if ($additionalTableJoins)
         $joinedTables[] = ' '. $additionalTableJoins;
      // galt: end edit 3
всего три вставки.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Добавление нового поля в таблицу product

Автор Jenechka

Ответов: 0
Просмотров: 736
Последний ответ 29.02.2016, 10:52:59
от Jenechka
Как поменять значение "Product Types" в Cherry Picker?

Автор otec1klas

Ответов: 2
Просмотров: 1306
Последний ответ 18.03.2015, 14:45:52
от Xammax
Как активировать счетчик в SP VirtueMart Product Slider?

Автор buzum

Ответов: 0
Просмотров: 987
Последний ответ 19.11.2014, 15:15:03
от buzum
Проблема Cherry Picker для Joomla 2.5 и VirtueMart 2

Автор Volos

Ответов: 0
Просмотров: 962
Последний ответ 08.04.2014, 16:32:43
от Volos
Fast Seller и Cherry Picker для категории товаров

Автор katjuha6

Ответов: 0
Просмотров: 939
Последний ответ 15.01.2014, 07:39:11
от katjuha6