Файловый менеджер - Редактировать - /home/lmsyaran/public_html/j3/plugins/hikashop/hikaparentchild/hikaparentchild.php
Назад
<?php /** * @package HikaShop for Joomla! * @version 4.4.4 * @author hikashop.com * @copyright (C) 2010-2021 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php class plgHikashopHikaparentchild extends JPlugin { public function __construct(&$subject, $config) { parent::__construct($subject, $config); $this->loadLanguage('plg_hikashop_hikaparentchild', JPATH_ADMINISTRATOR ); // $this->loadLanguage(); } public function onFieldsLoad(&$fields, &$options) { $me = new stdClass(); $me->name = 'hikaparentchild'; $me->text = JText::_('HIKAPARENTCHILD'); $me->options = array('required', 'default', 'columnname', '', '', 'myuser_options'); $fields[] = $me; $opt = new stdClass(); $opt->name = 'myuser_options'; $opt->text = JText::_('HIKAPARENTCHILD_OPTIONS'); $opt->own_block = true; $opt->obj = 'fieldOpt_myuser_options'; $options[$opt->name] = $opt; } public function onAfterOrderUpdate($order, $send_email) { if(!isset($params)){ $plugin = JPluginHelper::getPlugin('hikashop', 'hikaparentchild'); $params = new JRegistry(@$plugin->params); } $code = $params->get('onafterorderupdate', ''); eval($code); } public function onBeforeCalculateProductPriceForQuantity(&$product) { $currencyClass = hikashop_get('class.currency'); $quantity = @$product->cart_product_quantity; if(!isset($params)) { $plugin = JPluginHelper::getPlugin('hikashop', 'hikaparentchild'); $params = new JRegistry(@$plugin->params); } if($params->get('customfield', 0)) { $customfield = $params->get('customfield', 0); if(!empty($product->$customfield)){ $user_selected = explode(',', $product->$customfield); $quantity = $quantity*count($user_selected); } } $currencyClass->quantityPrices($product->prices,$quantity,$product->cart_product_total_quantity); } } if(defined('HIKASHOP_COMPONENT')) { require_once( dirname(__FILE__).DS.'hikaparentchild_class.php' ); } /* if(!function_exists('hikashop_product_price_for_quantity_in_cart') && !function_exists('hikashop_product_price_for_quantity_in_order')) { function hikashop_product_price_for_quantity_in_cart(&$product){ $currencyClass = hikashop_get('class.currency'); $quantity = @$product->cart_product_quantity; if(!isset($params)) { $plugin = JPluginHelper::getPlugin('hikashop', 'hikaparentchild'); $params = new JRegistry(@$plugin->params); } if($params->get('customfield', 0)) { $customfield = $params->get('customfield', 0); if(!empty($product->$customfield)){ $user_selected = explode(',', $product->$customfield); $quantity = $quantity*count($user_selected); } } $currencyClass->quantityPrices($product->prices,$quantity,$product->cart_product_total_quantity); } function hikashop_product_price_for_quantity_in_order(&$product){ $quantity = @$product->order_product_quantity; if(!isset($params)) { $plugin = JPluginHelper::getPlugin('hikashop', 'hikaparentchild'); $params = new JRegistry(@$plugin->params); } if($params->get('customfield', 0)) { $customfield = $params->get('customfield', 0); if(!empty($product->$customfield)){ $user_selected = explode(',', $product->$customfield); $quantity = $quantity*count($user_selected); } } $product->order_product_total_price_no_vat = $product->order_product_price*$quantity; $product->order_product_total_price = ($product->order_product_price+$product->order_product_tax)*$quantity; } } */
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка