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

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0



В стандартном функционале в корзине указывается только сумма в формате

Цитировать
Сумма 708.0 руб

Нужно чтобы в итоге было

Цитировать
Сумма     708.0 руб
Количество  10 штук



За вывод суммы отвечает этот кусок кода:
Код
 
 <tr>
    <td class = "name">
      <?php print _JSHOP_PRICE_TOTAL ?>
    </td>
    <td class = "value">
      <?php print formatprice($this->fullsumm)?><?php print $this->_tmp_ext_total?>
    </td>
</tr>


Очевидно, что если посчитать вместо суммы - количество, то это решит мою проблему. И тогда код будет выглядеть так:


Код
 <tr>
    <td class = "name">
      <?php print _JSHOP_PRICE_TOTAL ?>
    </td>
    <td class = "value">
      <?php print formatprice($this->fullsumm)?><?php print $this->_tmp_ext_total?>
    </td>
</tr>


 <tr>
    <td class = "name">
      <?php print _JSHOP_QUANTITY_TOTAL ?>
    </td>
    <td class = "value">
      <?php print formatprice($this->fullsumm)?><?php print $this->_tmp_ext_total?>   // Эту строку нужно заменить
    </td>
</tr>




Вопрос только в том - что поставить вместо прокомментированной строки?
Все переменные перебрал, без толку.
Поиск по форуму не помог.




« Последнее редактирование: 12.05.2013, 16:00:12 от misterfalse »
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Цитировать
Все переменные перебрал, без толку.
что, и даже print_r($this) не помогает?
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0
что, и даже print_r($this) не помогает?

я не очень хорош в php, если быть честным, то совсем плох))
при попытке вывести   <?print_r($this)?>  вместо  <?php print formatprice($this->fullsumm)?><?php print $this->_tmp_ext_total?> вылазит такая портянка, что черт ногу сломит)

если поясните - буду очень благодарен)
*

beliyadm

  • Легенда
  • 9758
  • 1664 / 66
  • Севастополь, Россия
выводите так, будет понятней
Код: php
<?
echo '<pre>';
var_dump($this);
echo '</pre>';
?>
Все истины, которые я хочу вам изложить, — бесстыдная ложь. Сделать всё хорошо
TLG: @Beliyadm
*

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0
выводите так, будет понятней
Код: php
<?
echo '<pre>';
var_dump($this);
echo '</pre>';
?>


2 товара добавил, (77 и 88 штук)

нашел 2 вхождения

["quantity"]=>
      int(77)

["quantity"]=>
      int(88)


Но их суммы нигде нет((
*

beliyadm

  • Легенда
  • 9758
  • 1664 / 66
  • Севастополь, Россия
Как то странно, в шаблоне оперируются элементы этого массива, в частности fullsumm и другие, но дамп их не показывает.. как то странно.
Не специалист в данном компоненте, но такого по идее в природе не бывает.
Покажите весь вывод дампа этого массива
Все истины, которые я хочу вам изложить, — бесстыдная ложь. Сделать всё хорошо
TLG: @Beliyadm
*

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0
Код
object(JshoppingViewCart)#476 (31) {
  ["_name":protected]=>
  string(4) "cart"
  ["_models":protected]=>
  array(0) {
  }
  ["_basePath":protected]=>
  string(65) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping"
  ["_defaultModel":protected]=>
  NULL
  ["_layout":protected]=>
  string(4) "cart"
  ["_layoutExt":protected]=>
  string(3) "php"
  ["_layoutTemplate":protected]=>
  string(1) "_"
  ["_path":protected]=>
  array(2) {
    ["template"]=>
    array(2) {
      [0]=>
      string(86) "/home/host1269479/krepauto.ru/htdocs/www/templates/it_theshop/html/com_jshopping/cart/"
      [1]=>
      string(90) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/"
    }
    ["helper"]=>
    array(1) {
      [0]=>
      string(74) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/helpers/"
    }
  }
  ["_template":protected]=>
  string(98) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php"
  ["_output":protected]=>
  NULL
  ["_escape":protected]=>
  string(16) "htmlspecialchars"
  ["_charset":protected]=>
  string(5) "UTF-8"
  ["_errors":protected]=>
  array(0) {
  }
  ["baseurl"]=>
  string(0) ""
  ["config"]=>
  object(jshopConfig)#275 (236) {
    ["_tbl":protected]=>
    string(19) "#__jshopping_config"
    ["_tbl_key":protected]=>
    string(2) "id"
    ["_db":protected]=>
    object(JDatabaseMySQLi)#15 (19) {
      ["name"]=>
      string(6) "mysqli"
      ["nameQuote":protected]=>
      string(1) "`"
      ["nullDate":protected]=>
      string(19) "0000-00-00 00:00:00"
      ["dbMinimum":protected]=>
      string(5) "5.0.4"
      ["_database":"JDatabase":private]=>
      string(16) "host1269479_joom"
      ["connection":protected]=>
      object(mysqli)#16 (18) {
        ["affected_rows"]=>
        int(1)
        ["client_info"]=>
        string(6) "5.5.29"
        ["client_version"]=>
        int(50529)
        ["connect_errno"]=>
        int(0)
        ["connect_error"]=>
        NULL
        ["errno"]=>
        int(0)
        ["error"]=>
        string(0) ""
        ["field_count"]=>
        int(5)
        ["host_info"]=>
        string(25) "Localhost via UNIX socket"
        ["info"]=>
        NULL
        ["insert_id"]=>
        int(0)
        ["server_info"]=>
        string(10) "5.5.29-log"
        ["server_version"]=>
        int(50529)
        ["stat"]=>
        string(150) "Uptime: 67284  Threads: 4  Questions: 20867227  Slow queries: 10341  Opens: 68611  Flush tables: 1  Open tables: 8192  Queries per second avg: 310.136"
        ["sqlstate"]=>
        string(5) "00000"
        ["protocol_version"]=>
        int(10)
        ["thread_id"]=>
        int(638457)
        ["warning_count"]=>
        int(0)
      }
      ["count":protected]=>
      int(0)
      ["cursor":protected]=>
     

Warning:  var_dump() [function.var-dump]: Couldn't fetch mysqli_result in /home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php on line 152



Warning:  var_dump() [function.var-dump]: Couldn't fetch mysqli_result in /home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php on line 152



Warning:  var_dump() [function.var-dump]: Property access is not allowed yet in /home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php on line 152



Warning:  var_dump() [function.var-dump]: Couldn't fetch mysqli_result in /home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php on line 152



Warning:  var_dump() [function.var-dump]: Property access is not allowed yet in /home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/templates/icetheme/cart/cart.php on line 152

object(mysqli_result)#481 (5) {
        ["current_field"]=>
        NULL
        ["field_count"]=>
        NULL
        ["lengths"]=>
        NULL
        ["num_rows"]=>
        NULL
        ["type"]=>
        NULL
      }
      ["debug":protected]=>
      bool(false)
      ["limit":protected]=>
      int(0)
      ["log":protected]=>
      array(0) {
      }
      ["offset":protected]=>
      int(0)
      ["sql":protected]=>
      string(154) "SELECT id, alias, `title_en-GB` as title, `keyword_en-GB` as keyword, `description_en-GB` as description FROM `#__jshopping_config_seo` where alias='cart'"
      ["tablePrefix":protected]=>
      string(6) "bi02f_"
      ["utf":protected]=>
      bool(true)
      ["errorNum":protected]=>
      int(0)
      ["errorMsg":protected]=>
      string(0) ""
      ["hasQuoted":protected]=>
      bool(false)
      ["quoted":protected]=>
      array(0) {
      }
    }
    ["_trackAssets":protected]=>
    bool(false)
    ["_rules":protected]=>
    NULL
    ["_locked":protected]=>
    bool(false)
    ["_errors":protected]=>
    array(0) {
    }
    ["id"]=>
    string(1) "1"
    ["count_products_to_page"]=>
    string(2) "12"
    ["count_products_to_row"]=>
    string(1) "3"
    ["count_category_to_row"]=>
    string(1) "1"
    ["image_category_width"]=>
    string(3) "180"
    ["image_category_height"]=>
    string(3) "200"
    ["image_product_width"]=>
    string(3) "200"
    ["image_product_height"]=>
    string(3) "200"
    ["image_product_full_width"]=>
    string(3) "350"
    ["image_product_full_height"]=>
    string(3) "350"
    ["video_product_width"]=>
    string(3) "320"
    ["video_product_height"]=>
    string(3) "240"
    ["adminLanguage"]=>
    string(5) "ru-RU"
    ["defaultLanguage"]=>
    string(5) "en-GB"
    ["mainCurrency"]=>
    string(1) "1"
    ["decimal_count"]=>
    string(1) "1"
    ["decimal_symbol"]=>
    string(1) "."
    ["thousand_separator"]=>
    string(1) " "
    ["currency_format"]=>
    string(1) "2"
    ["use_rabatt_code"]=>
    string(1) "0"
    ["enable_wishlist"]=>
    string(1) "0"
    ["default_status_order"]=>
    string(1) "1"
    ["order_number_type"]=>
    string(1) "1"
    ["store_name"]=>
    string(15) "test_store_name"
    ["store_company_name"]=>
    string(17) "test_company_name"
    ["store_url"]=>
    string(19) "http://test_url.com"
    ["store_address"]=>
    string(12) "test_address"
    ["store_city"]=>
    string(9) "test_city"
    ["store_country"]=>
    string(1) "0"
    ["store_state"]=>
    string(10) "test_state"
    ["store_zip"]=>
    string(6) "111111"
    ["store_address_format"]=>
    string(30) "%storename %address %city %zip"
    ["store_date_format"]=>
    string(8) "%d.%m.%Y"
    ["contact_firstname"]=>
    string(9) "firstname"
    ["contact_lastname"]=>
    string(8) "lastname"
    ["contact_middlename"]=>
    string(10) "middlename"
    ["contact_phone"]=>
    string(11) "111-111-111"
    ["contact_fax"]=>
    string(11) "111-111-111"
    ["contact_email"]=>
    string(14) "ongrod@mail.ru"
    ["store_logo"]=>
    string(0) ""
    ["store_email"]=>
    string(0) ""
    ["benef_bank_name"]=>
    string(4) "test"
    ["benef_bank_info"]=>
    string(4) "test"
    ["benef_bic"]=>
    string(4) "test"
    ["benef_conto"]=>
    string(4) "test"
    ["benef_payee"]=>
    string(4) "test"
    ["benef_iban"]=>
    string(4) "test"
    ["benef_swift"]=>
    string(4) "test"
    ["interm_name"]=>
    string(4) "test"
    ["interm_swift"]=>
    string(4) "test"
    ["identification_number"]=>
    string(0) ""
    ["tax_number"]=>
    string(0) ""
    ["allow_reviews_prod"]=>
    string(1) "1"
    ["allow_reviews_only_registered"]=>
    string(1) "1"
    ["allow_reviews_manuf"]=>
    string(1) "0"
    ["max_mark"]=>
    string(2) "10"
    ["summ_null_shipping"]=>
    string(5) "-1.00"
    ["without_shipping"]=>
    string(1) "1"
    ["without_payment"]=>
    string(1) "1"
    ["shop_special_type"]=>
    string(0) ""
    ["pdf_parameters"]=>
    string(13) "208:65:208:30"
    ["next_order_number"]=>
    string(1) "9"
    ["shop_user_guest"]=>
    string(1) "2"
    ["hide_product_not_avaible_stock"]=>
    string(1) "0"
    ["show_buy_in_category"]=>
    string(1) "1"
    ["user_as_catalog"]=>
    string(1) "0"
    ["show_tax_in_product"]=>
    string(1) "0"
    ["show_tax_product_in_cart"]=>
    string(1) "0"
    ["show_plus_shipping_in_product"]=>
    string(1) "0"
    ["hide_buy_not_avaible_stock"]=>
    string(1) "1"
    ["show_sort_product"]=>
    string(1) "0"
    ["show_count_select_products"]=>
    string(1) "1"
    ["order_send_pdf_client"]=>
    string(1) "1"
    ["order_send_pdf_admin"]=>
    string(1) "0"
    ["show_delivery_time"]=>
    string(1) "0"
    ["securitykey"]=>
    string(32) "970ba9d3ee3ad48c3e0f1a0d4ce2ed60"
    ["demo_type"]=>
    string(1) "0"
    ["product_show_manufacturer_logo"]=>
    string(1) "0"
    ["product_show_weight"]=>
    string(1) "0"
    ["max_count_order_one_product"]=>
    string(1) "0"
    ["min_count_order_one_product"]=>
    string(1) "0"
    ["min_price_order"]=>
    string(1) "0"
    ["max_price_order"]=>
    string(1) "0"
    ["hide_tax"]=>
    string(1) "0"
    ["licensekod"]=>
    string(0) ""
    ["product_attribut_first_value_empty"]=>
    string(1) "0"
    ["show_hits"]=>
    string(1) "0"
    ["show_registerform_in_logintemplate"]=>
    string(1) "0"
    ["admin_show_product_basic_price"]=>
    string(1) "0"
    ["admin_show_attributes"]=>
    string(1) "1"
    ["admin_show_delivery_time"]=>
    string(1) "1"
    ["admin_show_languages"]=>
    string(1) "1"
    ["use_different_templates_cat_prod"]=>
    string(1) "0"
    ["admin_show_product_video"]=>
    string(1) "1"
    ["admin_show_product_related"]=>
    string(1) "1"
    ["admin_show_product_files"]=>
    string(1) "1"
    ["admin_show_product_bay_price"]=>
    string(1) "0"
    ["admin_show_product_labels"]=>
    string(1) "1"
    ["sorting_country_in_alphabet"]=>
    string(1) "1"
    ["hide_text_product_not_available"]=>
    string(1) "0"
    ["show_weight_order"]=>
    string(1) "0"
    ["discount_use_full_sum"]=>
    string(1) "0"
    ["show_cart_all_step_checkout"]=>
    string(1) "0"
    ["use_plugin_content"]=>
    string(1) "0"
    ["display_price_admin"]=>
    string(1) "0"
    ["display_price_front"]=>
    string(1) "0"
    ["product_list_show_weight"]=>
    string(1) "0"
    ["product_list_show_manufacturer"]=>
    string(1) "0"
    ["use_extend_tax_rule"]=>
    string(1) "0"
    ["use_extend_display_price_rule"]=>
    string(1) "0"
    ["fields_register"]=>
    string(2708) "a:3:{s:8:"register";a:15:{s:5:"title";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"l_name";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:10:"firma_name";a:1:{s:7:"display";s:1:"1";}s:6:"street";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:3:"zip";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:4:"city";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"state";a:1:{s:7:"display";s:1:"1";}s:7:"country";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"phone";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:3:"fax";a:1:{s:7:"display";s:1:"1";}s:6:"f_name";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:5:"email";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:6:"u_name";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:8:"password";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:10:"password_2";a:2:{s:7:"require";i:1;s:7:"display";i:1;}}s:7:"address";a:9:{s:6:"l_name";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"street";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:3:"zip";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:4:"city";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"state";a:1:{s:7:"display";s:1:"1";}s:7:"country";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"phone";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"f_name";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:5:"email";a:2:{s:7:"require";i:1;s:7:"display";i:1;}}s:11:"editaccount";a:22:{s:5:"title";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"l_name";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:10:"firma_name";a:1:{s:7:"display";s:1:"1";}s:6:"street";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:3:"zip";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:4:"city";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"state";a:1:{s:7:"display";s:1:"1";}s:7:"country";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"phone";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:3:"fax";a:1:{s:7:"display";s:1:"1";}s:7:"d_title";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:8:"d_f_name";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:8:"d_l_name";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:12:"d_firma_name";a:1:{s:7:"display";s:1:"1";}s:8:"d_street";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:5:"d_zip";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"d_city";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:7:"d_state";a:1:{s:7:"display";s:1:"1";}s:9:"d_country";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:7:"d_phone";a:2:{s:7:"display";s:1:"1";s:7:"require";s:1:"1";}s:6:"f_name";a:2:{s:7:"require";i:1;s:7:"display";i:1;}s:5:"email";a:2:{s:7:"require";i:1;s:7:"display";i:1;}}}"
    ["template"]=>
    string(8) "icetheme"
    ["show_product_code"]=>
    string(1) "1"
    ["show_product_code_in_cart"]=>
    string(1) "0"
    ["savelog"]=>
    string(1) "0"
    ["savelogpaymentdata"]=>
    string(1) "0"
    ["product_list_show_min_price"]=>
    string(1) "0"
    ["product_count_related_in_row"]=>
    string(1) "3"
    ["category_sorting"]=>
    string(1) "1"
    ["product_sorting"]=>
    string(1) "1"
    ["product_sorting_direction"]=>
    string(1) "0"
    ["show_product_list_filters"]=>
    string(1) "0"
    ["admin_show_product_extra_field"]=>
    string(1) "0"
    ["product_list_display_extra_fields"]=>
    string(0) ""
    ["filter_display_extra_fields"]=>
    string(0) ""
    ["product_hide_extra_fields"]=>
    string(0) ""
    ["default_country"]=>
    string(1) "0"
    ["show_return_policy_in_email_order"]=>
    string(1) "0"
    ["client_allow_cancel_order"]=>
    string(1) "0"
    ["admin_show_vendors"]=>
    string(1) "0"
    ["vendor_order_message_type"]=>
    int(0)
    ["admin_not_send_email_order_vendor_order"]=>
    int(0)
    ["not_redirect_in_cart_after_buy"]=>
    string(1) "0"
    ["product_show_vendor"]=>
    int(0)
    ["product_show_vendor_detail"]=>
    int(0)
    ["product_list_show_vendor"]=>
    string(1) "0"
    ["admin_show_freeattributes"]=>
    string(1) "0"
    ["product_show_button_back"]=>
    string(1) "0"
    ["calcule_tax_after_discount"]=>
    string(1) "0"
    ["product_list_show_product_code"]=>
    string(1) "0"
    ["radio_attr_value_vertical"]=>
    string(1) "0"
    ["attr_display_addprice"]=>
    string(1) "0"
    ["use_ssl"]=>
    string(1) "0"
    ["product_list_show_price_description"]=>
    string(1) "0"
    ["display_button_print"]=>
    string(1) "0"
    ["hide_shipping_step"]=>
    string(1) "0"
    ["hide_payment_step"]=>
    string(1) "0"
    ["image_resize_type"]=>
    string(1) "0"
    ["product_show_manufacturer"]=>
    string(1) "0"
    ["use_extend_attribute_data"]=>
    string(1) "0"
    ["product_list_show_price_default"]=>
    string(1) "1"
    ["product_list_show_qty_stock"]=>
    string(1) "0"
    ["product_show_qty_stock"]=>
    string(1) "0"
    ["displayprice"]=>
    string(1) "0"
    ["use_decimal_qty"]=>
    string(1) "0"
    ["ext_tax_rule_for"]=>
    string(1) "0"
    ["display_reviews_without_confirm"]=>
    string(1) "0"
    ["manufacturer_sorting"]=>
    string(1) "1"
    ["admin_show_units"]=>
    string(1) "0"
    ["main_unit_weight"]=>
    string(1) "2"
    ["create_alias_product_category_auto"]=>
    string(1) "0"
    ["path"]=>
    string(66) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/"
    ["admin_path"]=>
    string(80) "/home/host1269479/krepauto.ru/htdocs/www/administrator/components/com_jshopping/"
    ["live_path"]=>
    string(44) "http://krepauto.ru/components/com_jshopping/"
    ["live_admin_path"]=>
    string(58) "http://krepauto.ru/administrator/components/com_jshopping/"
    ["log_path"]=>
    string(70) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/log/"
    ["importexport_live_path"]=>
    string(63) "http://krepauto.ru/components/com_jshopping/files/importexport/"
    ["importexport_path"]=>
    string(85) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/importexport/"
    ["image_category_live_path"]=>
    string(64) "http://krepauto.ru/components/com_jshopping/files/img_categories"
    ["image_category_path"]=>
    string(86) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_categories"
    ["image_product_live_path"]=>
    string(62) "http://krepauto.ru/components/com_jshopping/files/img_products"
    ["image_product_path"]=>
    string(84) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_products"
    ["image_manufs_live_path"]=>
    string(60) "http://krepauto.ru/components/com_jshopping/files/img_manufs"
    ["image_manufs_path"]=>
    string(82) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_manufs"
    ["video_product_live_path"]=>
    string(64) "http://krepauto.ru/components/com_jshopping/files/video_products"
    ["video_product_path"]=>
    string(86) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/video_products"
    ["demo_product_live_path"]=>
    string(63) "http://krepauto.ru/components/com_jshopping/files/demo_products"
    ["demo_product_path"]=>
    string(85) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/demo_products"
    ["files_product_live_path"]=>
    string(64) "http://krepauto.ru/components/com_jshopping/files/files_products"
    ["files_product_path"]=>
    string(86) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/files_products"
    ["pdf_orders_live_path"]=>
    string(60) "http://krepauto.ru/components/com_jshopping/files/pdf_orders"
    ["pdf_orders_path"]=>
    string(82) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/pdf_orders"
    ["image_attributes_live_path"]=>
    string(64) "http://krepauto.ru/components/com_jshopping/files/img_attributes"
    ["image_attributes_path"]=>
    string(86) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_attributes"
    ["image_labels_live_path"]=>
    string(60) "http://krepauto.ru/components/com_jshopping/files/img_labels"
    ["image_labels_path"]=>
    string(82) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_labels"
    ["image_vendors_live_path"]=>
    string(61) "http://krepauto.ru/components/com_jshopping/files/img_vendors"
    ["image_vendors_path"]=>
    string(83) "/home/host1269479/krepauto.ru/htdocs/www/components/com_jshopping/files/img_vendors"
    ["user_field_client_type"]=>
    array(3) {
      [0]=>
      string(10) "Выбор"
      [1]=>
      string(29) "Физическое лицо"
      [2]=>
      string(10) "Фирма"
    }
    ["arr"]=>
    array(1) {
      ["title"]=>
      array(3) {
        [0]=>
        string(10) "Выбор"
        [1]=>
        string(7) "Муж."
        [2]=>
        string(7) "Жен."
      }
    }
    ["sorting_products_field_select"]=>
    array(6) {
      [1]=>
      string(4) "name"
      [2]=>
      string(18) "prod.product_price"
      [3]=>
      string(23) "prod.product_date_added"
      [5]=>
      string(19) "prod.average_rating"
      [6]=>
      string(9) "prod.hits"
      [4]=>
      string(23) "pr_cat.product_ordering"
    }
    ["sorting_products_name_select"]=>
    array(6) {
      [1]=>
      string(16) "Название"
      [2]=>
      string(8) "Цена"
      [3]=>
      string(8) "Дата"
      [5]=>
      string(14) "Рейтинг"
      [6]=>
      string(24) "Популярность"
      [4]=>
      string(34) "Предустановленная"
    }
    ["sorting_products_field_s_select"]=>
    array(5) {
      [1]=>
      string(4) "name"
      [2]=>
      string(18) "prod.product_price"
      [3]=>
      string(23) "prod.product_date_added"
      [5]=>
      string(19) "prod.average_rating"
      [6]=>
      string(9) "prod.hits"
    }
    ["sorting_products_name_s_select"]=>
    array(5) {
      [1]=>
      string(16) "Название"
      [2]=>
      string(8) "Цена"
      [3]=>
      string(8) "Дата"
      [5]=>
      string(14) "Рейтинг"
      [6]=>
      string(24) "Популярность"
    }
    ["format_currency"]=>
    array(4) {
      [1]=>
      string(6) "00Symb"
      [2]=>
      string(7) "00 Symb"
      [3]=>
      string(6) "Symb00"
      [4]=>
      string(7) "Symb 00"
    }
    ["count_product_select"]=>
    array(6) {
      [5]=>
      int(5)
      [10]=>
      int(10)
      [15]=>
      int(15)
      [20]=>
      int(20)
      [25]=>
      int(25)
      [50]=>
      int(50)
    }
    ["payment_status_enable_download_sale_file"]=>
    array(3) {
      [0]=>
      int(5)
      [1]=>
      int(6)
      [2]=>
      int(7)
    }
    ["payment_status_return_product_in_stock"]=>
    array(2) {
      [0]=>
      int(3)
      [1]=>
      int(4)
    }
    ["max_number_download_sale_file"]=>
    int(3)
    ["payment_status_for_cancel_client"]=>
    int(3)
    ["payment_status_disable_cancel_client"]=>
    array(1) {
      [0]=>
      int(7)
    }
    ["cart_back_to_shop"]=>
    string(4) "list"
    ["product_button_back_use_end_list"]=>
    int(0)
    ["display_tax_id_in_pdf"]=>
    int(0)
    ["image_quality"]=>
    int(100)
    ["image_fill_color"]=>
    int(16777215)
    ["product_price_qty_discount"]=>
    int(2)
    ["rating_starparts"]=>
    int(2)
    ["use_simple_sef"]=>
    int(0)
    ["show_list_price_shipping_weight"]=>
    int(0)
    ["product_price_precision"]=>
    int(2)
    ["cart_decimal_qty_precision"]=>
    int(2)
    ["product_add_price_default_unit"]=>
    int(3)
    ["default_frontend_currency"]=>
    int(0)
    ["cur_currency"]=>
    string(1) "1"
    ["currency_value"]=>
    string(8) "1.000000"
    ["currency_code"]=>
    string(6) "руб"
    ["currency_code_iso"]=>
    string(6) "руб"
    ["frontend_lang"]=>
    string(5) "en-GB"
    ["cur_lang"]=>
    string(5) "en-GB"
    ["pdf_footer_height"]=>
    string(2) "30"
    ["pdf_footer_width"]=>
    int(208)
    ["pdf_header_height"]=>
    string(2) "65"
    ["pdf_header_width"]=>
    int(208)
    ["controler_buy_qty"]=>
    int(1)
    ["display_price_front_current"]=>
    string(1) "0"
    ["show_product_code_in_order"]=>
    int(1)
    ["image_cut"]=>
    int(1)
    ["image_fill"]=>
    int(2)
  }
  ["products"]=>
  array(2) {
    [0]=>
    array(20) {
      ["quantity"]=>
      int(777)
      ["product_id"]=>
      string(2) "38"
      ["category_id"]=>
      string(2) "52"
      ["price"]=>
      float(11.5)
      ["tax"]=>
      string(4) "0.00"
      ["tax_id"]=>
      string(1) "1"
      ["product_name"]=>
      string(4) "0002"
      ["thumb_image"]=>
      string(42) "thumb_e64deca5ec7ee8adb8a779aab5631e12.JPG"
      ["ean"]=>
      string(0) ""
      ["attributes"]=>
      string(6) "a:0:{}"
      ["attributes_value"]=>
      array(0) {
      }
      ["weight"]=>
      string(6) "0.0000"
      ["vendor_id"]=>
      string(1) "1"
      ["files"]=>
      string(6) "a:0:{}"
      ["freeattributes"]=>
      string(6) "a:0:{}"
      ["dependent_attr_serrialize"]=>
      string(6) "a:0:{}"
      ["href"]=>
      string(34) "/universal/product/view/52/38.html"
      ["href_delete"]=>
      string(39) "/universal/cart/delete.html?number_id=0"
      ["free_attributes_value"]=>
      array(0) {
      }
      ["_qty_unit"]=>
      string(467) "
"
    }
    [1]=>
    array(20) {
      ["quantity"]=>
      int(444)
      ["product_id"]=>
      string(1) "1"
      ["category_id"]=>
      string(2) "48"
      ["price"]=>
      float(11.5)
      ["tax"]=>
      string(4) "0.00"
      ["tax_id"]=>
      string(1) "1"
      ["product_name"]=>
      string(40) "Тест на производителя"
      ["thumb_image"]=>
      string(42) "thumb_63316b436446ed01c6bf5746bfa52ce0.JPG"
      ["ean"]=>
      string(26) "113857117B, 697207, 9023G0"
      ["attributes"]=>
      string(6) "a:0:{}"
      ["attributes_value"]=>
      array(0) {
      }
      ["weight"]=>
      string(6) "1.0000"
      ["vendor_id"]=>
      string(1) "1"
      ["files"]=>
      string(6) "a:0:{}"
      ["freeattributes"]=>
      string(6) "a:0:{}"
      ["dependent_attr_serrialize"]=>
      string(6) "a:0:{}"
      ["href"]=>
      string(33) "/universal/product/view/48/1.html"
      ["href_delete"]=>
      string(39) "/universal/cart/delete.html?number_id=1"
      ["free_attributes_value"]=>
      array(0) {
      }
      ["_qty_unit"]=>
      string(467) "
"
    }
  }
  ["summ"]=>
  float(14041.5)
  ["image_product_path"]=>
  string(62) "http://krepauto.ru/components/com_jshopping/files/img_products"
  ["image_path"]=>
  string(44) "http://krepauto.ru/components/com_jshopping/"
  ["no_image"]=>
  string(11) "noimage.gif"
  ["href_shop"]=>
  string(13) "/peugeot.html"
  ["href_checkout"]=>
  string(30) "/universal/checkout/step2.html"
  ["discount"]=>
  float(0)
  ["free_discount"]=>
  int(0)
  ["use_rabatt"]=>
  string(1) "0"
  ["tax_list"]=>
  array(0) {
  }
  ["fullsumm"]=>
  float(14041.5)
  ["show_percent_tax"]=>
  int(0)
  ["hide_subtotal"]=>
  int(1)
  ["weight"]=>
  float(444)
  ["shippinginfo"]=>
  string(37) "/universal/content/view/shipping.html"
}
*

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0
Как то странно, в шаблоне оперируются элементы этого массива, в частности fullsumm и другие, но дамп их не показывает.. как то странно.
Не специалист в данном компоненте, но такого по идее в природе не бывает.
Покажите весь вывод дампа этого массива

в данном случае было 777 и 888 товаров
*

beliyadm

  • Легенда
  • 9758
  • 1664 / 66
  • Севастополь, Россия
Там же идет раздербанивание массива $this
foreach($this->products as $key_id=>$prod){}
Внутри и пишем что-то вроде внутри этого цикла в шаблоне корзины (если правильно понял что это файл components\com_jshopping\templates\шаблон\cart\cart.php
Код: php
echo 'Общая стоимость: '.formatprice($prod['price']*$prod['quantity']);
echo 'количество товара: '.$prod['quantity'];
Все истины, которые я хочу вам изложить, — бесстыдная ложь. Сделать всё хорошо
TLG: @Beliyadm
*

misterfalse

  • Захожу иногда
  • 77
  • 0 / 0
 :D
Спасибо за помощь, все решилось немного другим способом:

Код
<?php	  
$cart = JModel::getInstance('cart', 'jshop');
$cart->load("cart");
?>
<span id = "jshop_quantity_products"><?php print $cart->count_product?></span>


+1 вам в карму)
*

Argawa

  • Захожу иногда
  • 139
  • 1 / 0
:D
Спасибо за помощь, все решилось немного другим способом:

Код
<?php	  
$cart = JModel::getInstance('cart', 'jshop');
$cart->load("cart");
?>
<span id = "jshop_quantity_products"><?php print $cart->count_product?></span>


+1 вам в карму)

А если выводить количество в корзине определенного товара?
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
то надо перебрать массив $cart->products и посчитать количество определенного (product_id) товара :)
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

Argawa

  • Захожу иногда
  • 139
  • 1 / 0
то надо перебрать массив $cart->products и посчитать количество определенного (product_id) товара :)


Вот что выдал var_dump
Код
array(1) {
  [1]=>
  array(18) {
    ["quantity"]=>
    int(1)
    ["product_id"]=>
    int(1)
    ["category_id"]=>
    string(1) "1"
    ["tax"]=>
    NULL
    ["tax_id"]=>
    string(1) "0"
    ["product_name"]=>
    string(10) "Товар"
    ["thumb_image"]=>
    string(18) "thumb_product1.jpg"
    ["delivery_times_id"]=>
    string(1) "0"
    ["ean"]=>
    string(0) ""
    ["attributes"]=>
    string(6) "a:0:{}"
    ["attributes_value"]=>
    array(0) {
    }
    ["extra_fields"]=>
    array(0) {
    }
    ["weight"]=>
    string(6) "0.0000"
    ["vendor_id"]=>
    string(1) "1"
    ["files"]=>
    string(6) "a:0:{}"
    ["freeattributes"]=>
    string(6) "a:0:{}"
    ["pid_check_qty_value"]=>
    string(3) "P:1"
    ["price"]=>
    float(100)
  }
}

А вот как вывести переменную, отвечающую за количество пока еще силенок не хватает
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Код
foreach ($cart->products as $product) {
// id товара - $product["product_id"]
// количество товара - $product["quantity"]
}
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

Argawa

  • Захожу иногда
  • 139
  • 1 / 0
Код
foreach ($cart->products as $product) {
// id товара - $product["product_id"]
// количество товара - $product["quantity"]
}

С этим разобрался. Но при выводе данных, выводятся данные для всех товаров на странице, а для отдельно взятого товара не получается. Дмитрий, буду признателен за заветную строчку кода ))) Уж больно она нужна.
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
какую "заветную"?
Код
if ($product["product_id"] == нужный product_id) {

}
?
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

urry

  • Захожу иногда
  • 109
  • 0 / 0
Доброй ночи!

Коллеги, подскажите, пожалуйста, а как достать из этого же $this поле ["next_order_number"]?

Вывести его при помощи print_r($this) я догадался, но как к нему обратиться, чтобы этот самый номер получить - ума не приложу. Судя по выведенному тексту, это поле объекта object(mysqli_result).

Выше у участников обсуждения в приведенном куске кода тоже есть это поле ["next_order_number"].

В общем, если кто-то подскажет, как дотянуться до этого поля - буду крайне благодарен!
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
попробуйте $this->config->next_order_number
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

urry

  • Захожу иногда
  • 109
  • 0 / 0
Все заработало. Огромное человеческое спасибо - уже часа 3 тыкаюсь наугад.

Я бы вас расцеловал :)
*

loinka

  • Новичок
  • 1
  • 0 / 0
Добрый день!
[size=78%]
:D Спасибо за помощь, все решилось немного другим способом:
Код
 load("cart"); ?> count_product?> 
+1 вам в карму)
[/size]Подскажите куда именно вставить код? Вставляю вместо кода, который в первом посте, ничего не выходит :(
Я не спец в php, уж извините, но очень много времени ушло, а в итоге ничего  >:(
Надо просто вывести общее количество товаров в корзине
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Фильтр товаров для JoomShopping 5

Автор Lemonez

Ответов: 13
Просмотров: 756
Последний ответ 12.04.2024, 21:20:02
от nevigen
WT JoomShopping Favorite - кнопки избранного в категории товаров и карточке тов

Автор sergeytolkachyov

Ответов: 13
Просмотров: 2052
Последний ответ 03.04.2024, 14:24:38
от sergeytolkachyov
Модуль карусели товаров JoomShopping на Swiper.js для Joomla

Автор sergeytolkachyov

Ответов: 1
Просмотров: 429
Последний ответ 10.01.2024, 19:54:00
от sergeytolkachyov
Вывести название категории в списке товаров

Автор ataman

Ответов: 9
Просмотров: 3511
Последний ответ 15.09.2023, 20:31:11
от Alex_gs
Как вывести опции характеристики JoomShopping списком?

Автор timofe

Ответов: 7
Просмотров: 629
Последний ответ 06.06.2023, 19:07:29
от kit2m2