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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/home/htlwork.com/www/dev/pricelow/app/code/WebbyTroops/
Upload File :
Current File : /home/htlwork.com/www/dev/pricelow/app/code/WebbyTroops/ProductSellerInfo.tar
ProductSellerInfo/0000755000000000000000000000000014364325176013172 5ustar  rootrootProductSellerInfo/etc/0000755000000000000000000000000014364325176013745 5ustar  rootrootProductSellerInfo/etc/di.xml0000644000000000000000000000243614364325176015070 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">wt_product_enqury</argument>
            <argument name="eventPrefix" xsi:type="string">product_seller_info_list__grid_collection</argument>
            <argument name="eventObject" xsi:type="string">product_seller_info_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="product_seller_info_listing_data_source" xsi:type="string">WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
    <virtualType name="productSellerInfoBlock" type="WebbyTroops\ProductSellerInfo\Block\ProductSellerInfo">
    </virtualType>
</config>ProductSellerInfo/etc/module.xml0000644000000000000000000000041414364325176015753 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="WebbyTroops_ProductSellerInfo" setup_version="1.0.1"/>
</config>
ProductSellerInfo/etc/db_schema.xml0000644000000000000000000000413114364325176016373 0ustar  rootroot<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="wt_product_enqury" resource="default" engine="innodb" comment="Seller Information Product Enqury">
        <column xsi:type="int" name="id" padding="10" unsigned="false" nullable="false" identity="true" comment="ID"/>
        <column xsi:type="int" name="product_id" padding="10" unsigned="false" nullable="false" comment="Product Id"/>
        <column xsi:type="varchar" name="product_name" nullable="true" length="255" comment="Product Name"/>
        <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Product SKU"/>
        <column xsi:type="int" name="price" padding="10" unsigned="false" nullable="true" comment="Product Id"/>
        <column xsi:type="text" name="query_description" nullable="true" comment="Query Description"/>
        <column xsi:type="int" name="seller_id" padding="10" unsigned="false" nullable="false" comment="Seller Id"/>
        <column xsi:type="varchar" name="seller_name" nullable="true" length="255" comment="Seller Name"/>
        <column xsi:type="varchar" name="seller_email" nullable="true" length="255" comment="Seller Email"/>
        <column xsi:type="int" name="customer_id" padding="10" unsigned="false" nullable="false" comment="customer Id"/>
        <column xsi:type="varchar" name="customer_name" nullable="true" length="255" comment="customer Name"/>
        <column xsi:type="varchar" name="customer_email" nullable="true" length="255" comment="customer Email"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" comment="Created At" default="CURRENT_TIMESTAMP"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" comment="Updated At" default="CURRENT_TIMESTAMP"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
    </table>
</schema>ProductSellerInfo/etc/adminhtml/0000755000000000000000000000000014364325176015722 5ustar  rootrootProductSellerInfo/etc/adminhtml/di.xml0000644000000000000000000000055514364325176017045 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Lof\MarketPlace\Block\Adminhtml\Seller\Edit\Tab\Main" type="WebbyTroops\ProductSellerInfo\Block\Adminhtml\MarketPlace\Seller\Edit\Tab\Main" />
</config>ProductSellerInfo/etc/adminhtml/menu.xml0000644000000000000000000000115514364325176017412 0ustar  rootroot<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="WebbyTroops_ProductSellerInfo::product_seller_info" 
             title="Product Enqury Seller Information" 
             translate="title"
             module="WebbyTroops_ProductSellerInfo" 
             sortOrder="30" 
             action="product_seller_info/index/index"
             parent="WebbyTroops_ServiceFees::core" 
             resource="WebbyTroops_ProductSellerInfo::product_seller_info"/>
    </menu>
</config>ProductSellerInfo/etc/adminhtml/system.xml0000644000000000000000000001021014364325176017762 0ustar  rootroot<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="webbytroops" translate="label" sortOrder="5010" class="webbytroops-tab">
            <label>WebbyTroops</label>
        </tab>
        <section id="sellerinfo" translate="label" type="text" sortOrder="-5000" showInDefault="1" showInWebsite="1"
                 showInStore="1">
            <label>Seller Information</label>
            <tab>webbytroops</tab>
            <resource>WebbyTroops_ProductSellerInfo::configuration</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General</label>
                <field id="status" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="admin_name_add" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Admin Name For Email</label>
                    <validate>required-entry</validate>
                </field>
                <field id="admin_email_add" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Admin Email Address</label>
                    <validate>required-entry</validate>
                </field>
                <field id="admin_email_temp" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Admin Email Template</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                     <!--This model return all transactional email template list of magento--> 
                </field>
                <field id="vendor_email_temp" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Vendor Email Template</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                     <!--This model return all transactional email template list of magento--> 
                </field>
            </group>            
        </section>
        <section id="customer_disclaimer" translate="label" type="text" sortOrder="-4000" showInDefault="1" showInWebsite="1"
                 showInStore="1">
            <label>Customer Disclaimer</label>
            <tab>webbytroops</tab>
            <resource>WebbyTroops_ProductSellerInfo::customer_disclaimer</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General</label>
                <field id="customer_disclaimer_msg" translate="label comment" type="textarea" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Customer Disclaimer Message</label>
                    <validate>required-entry</validate>
                </field>
            </group>            
        </section>
        <section id="estimateddeliverydate" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="orders" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="message_for_product_sidebar" translate="label comment" type="textarea" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Message on the product pages sidebar</label>
                    <comment><![CDATA[You can use the following placeholders {{from_x_day}}, {{to_x_day}}, {{from_date}}, {{to_date}}, {{from_x_week}}, {{to_x_week}} and/or {{countdown}}]]></comment>
                    
                </field>
            </group>
        </section>
    </system>
</config>
ProductSellerInfo/etc/adminhtml/routes.xml0000644000000000000000000000055214364325176017767 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="product_seller_info" frontName="product_seller_info">
            <module name="WebbyTroops_ProductSellerInfo"/>
        </route>
    </router>
</config>ProductSellerInfo/etc/email_templates.xml0000644000000000000000000000110014364325176017624 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="sellerinfo_general_admin_email_temp" label="Email Template For Admin" file="email_template_for_admin.html" type="html" module="WebbyTroops_ProductSellerInfo" area="adminhtml"/>
    <template id="sellerinfo_general_vendor_email_temp" label="Email Template For Vendor" file="email_template_for_vendor.html" type="html" module="WebbyTroops_ProductSellerInfo" area="adminhtml"/>
</config>ProductSellerInfo/etc/acl.xml0000644000000000000000000000127614364325176015234 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="WebbyTroops_ServiceFees::core" title="WebbyTroops">
                    <resource id="WebbyTroops_ProductSellerInfo::component" title="Component" sortOrder="10">
                        <resource id="WebbyTroops_ProductSellerInfo::product_seller_info" title="Product Enqury Seller Information" sortOrder="20"/>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>ProductSellerInfo/etc/frontend/0000755000000000000000000000000014364325176015564 5ustar  rootrootProductSellerInfo/etc/frontend/routes.xml0000644000000000000000000000054614364325176017634 0ustar  rootroot<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="product_seller_info" frontName="product_seller_info">
            <module name="WebbyTroops_ProductSellerInfo"/>
        </route>
    </router>
</config>
ProductSellerInfo/Block/0000755000000000000000000000000014364325176014224 5ustar  rootrootProductSellerInfo/Block/ProductSellerInfo.php0000644000000000000000000000156414364325176020346 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Block;

class ProductSellerInfo extends \Magento\Framework\View\Element\Template
{
        protected $_registry;
        
        protected $productSellerInfoFactory;
        
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfo $productSellerInfoFactory,
        array $data = []
    ) {
        $this->_registry = $registry;
        $this->productSellerInfoFactory = $productSellerInfoFactory;
        parent::__construct($context, $data);
    }
    
    public function getCurrentCategory()
    {
        return $this->_registry->registry('current_category');
    }
    
    public function getCurrentProduct()
    {
        return $this->_registry->registry('current_product');
    }
}
ProductSellerInfo/Block/Adminhtml/0000755000000000000000000000000014364325176016141 5ustar  rootrootProductSellerInfo/Block/Adminhtml/MarketPlace/0000755000000000000000000000000014364325176020331 5ustar  rootrootProductSellerInfo/Block/Adminhtml/MarketPlace/Seller/0000755000000000000000000000000014364325176021557 5ustar  rootrootProductSellerInfo/Block/Adminhtml/MarketPlace/Seller/Edit/0000755000000000000000000000000014364325176022444 5ustar  rootrootProductSellerInfo/Block/Adminhtml/MarketPlace/Seller/Edit/Tab/0000755000000000000000000000000014364325176023152 5ustar  rootrootProductSellerInfo/Block/Adminhtml/MarketPlace/Seller/Edit/Tab/Main.php0000644000000000000000000003351514455063040024544 0ustar  rootroot<?php
/**
 * Landofcoder
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Landofcoder.com license that is
 * available through the world-wide-web at this URL:
 * https://landofcoder.com/terms
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category   Landofcoder
 * @package    Lof_MarketPlace
 * @copyright  Copyright (c) 2021 Landofcoder (https://www.landofcoder.com/)
 * @license    https://landofcoder.com/terms
 */
namespace WebbyTroops\ProductSellerInfo\Block\Adminhtml\MarketPlace\Seller\Edit\Tab;

class Main extends \Lof\MarketPlace\Block\Adminhtml\Seller\Edit\Tab\Main
{
    /**
     * @var \Magento\Store\Model\System\Store
     */
//    protected $_systemStore;
//
//    /**
//     * @var \Magento\Cms\Model\Wysiwyg\Config
//     */
//    protected $_wysiwygConfig;
//
//    /**
//     * @var \Lof\MarketPlace\Helper\Data
//     */
//    protected $_viewHelper;
//
//    /**
//     * @var \Magento\Directory\Model\Config\Source\Country
//     */
//    protected $_country;
//
//    /**
//     * @var \Magento\Directory\Model\RegionFactory
//     */
//    protected $_regionFactory;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Data
     */
    protected $wtSellerHelper;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Store\Model\System\Store $systemStore,
        \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
        \Lof\MarketPlace\Helper\Data $viewHelper,
        \Magento\Directory\Model\Config\Source\Country $country,
        \Magento\Directory\Model\RegionFactory $regionFactory,
        \WebbyTroops\ProductSellerInfo\Helper\Data $wtSellerHelper,
        array $data = array()
    ) {
        parent::__construct(
            $context,
            $registry,
            $formFactory,
            $systemStore,
            $wysiwygConfig,
            $viewHelper,
            $country,
            $regionFactory,
            $data
        );
        $this->wtSellerHelper = $wtSellerHelper;
    }


    /**
     * Prepare form
     *
     * @return $this
     */
    protected function _prepareForm()
    {
        /** @var $model \Lof\MarketPlace\Model\Seller */
        $model = $this->_coreRegistry->registry('lof_marketplace_seller');
        $formData = array('country_id' => "");
        $countries = $this->_country->toOptionArray(false, 'US');
        $regionCollection = $this->_regionFactory->create()->getCollection()->addCountryFilter(
            $formData['country_id']
        );
        $regions = $regionCollection->toOptionArray();

        /**
         * Checking if user have permission to save information
         */
        if ($this->_isAllowedAction('Lof_MarketPlace::seller_edit')) {
            $isElementDisabled = false;
        } else {
            $isElementDisabled = true;
        }

        /** @var \Magento\Framework\Data\Form $form */
        $form = $this->_formFactory->create();

        $form->setHtmlIdPrefix('seller_');

        $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Seller Information')]);


        if ($model->getId()) {
            $fieldset->addField('seller_id', 'hidden', ['name' => 'seller_id']);
        }

        $fieldset->addField(
            'name',
            'text',
            [
                'name' => 'name',
                'label' => __('Seller Name'),
                'title' => __('Seller Name'),
                'required' => true,
                'disabled' => $isElementDisabled
            ]
        );
        if ($model->getData('url_key')) {
            $fieldset->addField(
                'link_seller',
                'note',
                [
                'name' => 'link_seller',
                'label' => __('Link Seller'),
                'title' => __('Link Seller'),
                'text' => $model->getUrl()
                ]
            );
        }
        $fieldset->addField(
            'url_key',
            'text',
            [
                'name' => 'url_key',
                'label' => __('URL Key'),
                'title' => __('URL Key'),
                'note' => __('Empty to auto create url key'),
                'disabled' => $isElementDisabled
            ]
        );
        $fieldset->addField(
            'telephone',
            'text',
            [
                'name' => 'telephone',
                'label' => __('Contact Number'),
                'title' => __('Contact Number'),
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'shop_title',
            'text',
            [
                'name' => 'shop_title',
                'label' => __('Shop Title'),
                'title' => __('Shop Title'),
                'disabled' => $isElementDisabled
             ]
        );
        $fieldset->addField(
            'group_id',
            'select',
            [
                'label' => __('Seller Group'),
                'title' => __('Seller Group'),
                'name' => 'group_id',
                'required' => true,
                'options' => $this->_viewHelper->getGroupList(),
                'disabled' => $isElementDisabled
            ]
        );

        if ($model->getCustomerId()) {
            $customer = $fieldset->addField(
                'customer_id',
                'select',
                [
                    'label' => __('Customer'),
                    'title' => __('Customer'),
                    'name' => 'customer_id',
                    'required' => false,
                    'options' => $this->_viewHelper->getCustomerList($model->getCustomerId()),
                    'disabled' => $isElementDisabled
                 ]
            );
            $email = $fieldset->addField(
                "email",
                "text",
                [
                    "label"     => __("Email Address"),
                    "class"     => "required-entry validate-email",
                    "required"  => true,
                    "name"      => "email"
                ]
            );
        } else {
            $customer = $fieldset->addField(
                'customer_id',
                'select',
                [
                    'label' => __('Customer'),
                    'title' => __('Customer'),
                    'name' => 'customer_id',
                    'required' => false,
                    'options' => $this->_viewHelper->getCustomerList(),
                    'disabled' => $isElementDisabled
                 ]
            );
            $email = $fieldset->addField(
                "email",
                "text",
                [
                    "label"     => __("Email Address"),
                    "class"     => "required-entry validate-email",
                    "required"  => true,
                    "name"      => "email"
                ]
            );
        }


        $fieldset->addField(
            'image',
            'image',
            [
                'name' => 'image',
                'label' => __('Company Banner'),
                'title' => __('Company Banner'),
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'thumbnail',
            'image',
            [
                'name' => 'thumbnail',
                'label' => __('Company Logo'),
                'title' => __('Company Logo'),
                'disabled' => $isElementDisabled
            ]
        );

        $wysiwygDescriptionConfig = $this->_wysiwygConfig->getConfig(['tab_id' => $this->getTabId()]);
        $fieldset->addField(
            'company_locality',
            'text',
            [
                'name' => 'company_locality',
                'label' => __('Company Locality'),
                'title' => __('Company Locality'),
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'company',
            'text',
            [
                'name' => 'company',
                'label' => __('Company'),
                'title' => __('Company'),
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'company_description',
            'editor',
            [
                'name' => 'company_description',
                'style' => 'height:200px;',
                'label' => __('Company Description'),
                'title' => __('Company Description'),
                'disabled' => $isElementDisabled,
                'config' => $wysiwygDescriptionConfig
            ]
        );

//        $fieldset->addField(
//            'return_policy',
//            'editor',
//            [
//                'name' => 'return_policy',
//                'style' => 'height:200px;',
//                'label' => __('Return Policy'),
//                'title' => __('Return Policy'),
//                'disabled' => $isElementDisabled,
//                'config' => $wysiwygDescriptionConfig
//            ]
//        );
        $returnPolicyOption = $this->wtSellerHelper->getReturnPolicyOption();
        
        $fieldset->addField(
            'return_policy',
            'select',
            [
                'label' => __('Return Policy GK'),
                'title' => __('Return Policy GK'),
                'name' => 'return_policy',
                'required' => true,
                'options' => $returnPolicyOption,
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'shipping_policy',
            'editor',
            [
                'name' => 'shipping_policy',
                'style' => 'height:200px;',
                'label' => __('Shipping Policy'),
                'title' => __('Shipping Policy'),
                'disabled' => $isElementDisabled,
                'config' => $wysiwygDescriptionConfig
             ]
        );
        /**
         * Check is single store mode
         */
        if (!$this->_storeManager->isSingleStoreMode()) {
            $field = $fieldset->addField(
                'store_id',
                'multiselect',
                [
                    'name' => 'stores[]',
                    'label' => __('Store View'),
                    'title' => __('Store View'),
                    'required' => true,
                    'values' => $this->_systemStore->getStoreValuesForForm(false, true),
                    'disabled' => $isElementDisabled
                ]
            );
            $renderer = $this->getLayout()->createBlock(
                'Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element'
            );
            $field->setRenderer($renderer);
        } else {
            $fieldset->addField(
                'store_id',
                'hidden',
                ['name' => 'stores[]', 'value' => $this->_storeManager->getStore(true)->getId()]
            );
            $model->setStoreId($this->_storeManager->getStore(true)->getId());
        }

        $fieldset->addField(
            'address',
            'text',
            [
                'name' => 'address',
                'label' => __('Address'),
                'title' => __('Address'),
                'disabled' => $isElementDisabled
            ]
        );
        $fieldset->addField(
            'country_id',
            'select',
            [
                'name' => 'country_id',
                'label' => __('Country'),
                'title'    => __('Country'),
                'required' => true,
                'values' => $countries,
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'region_id',
            'select',
            [
                'name' => 'region_id',
                'label' => __('State'),
                'title'    => __('State'),
                'values' => $regions,
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'postcode',
            'text',
            [
                'name' => 'postcode',
                'label' => __('Postcode'),
                'title' => __('Postcode'),
                'disabled' => $isElementDisabled
            ]
        );



        $fieldset->addField(
            'city',
            'text',
            [
                'name' => 'city',
                'label' => __('City'),
                'title'    => __('City'),
                'disabled' => $isElementDisabled
            ]
        );


        $fieldset->addField(
            'position',
            'text',
            [
                'name' => 'position',
                'label' => __('Position'),
                'title' => __('Position'),
                'disabled' => $isElementDisabled
            ]
        );

        $fieldset->addField(
            'status',
            'select',
            [
                'label' => __('Status'),
                'title' => __('Page Status'),
                'name' => 'status',
                'options' => $model->getAvailableStatuses(),
                'disabled' => $isElementDisabled
            ]
        );

        $this->setChild(
            'form_after',
            $this->getLayout()->createBlock('Magento\Framework\View\Element\Template')->setTemplate('Lof_MarketPlace::country/js.phtml')
        );


        $form->setValues($model->getData());
        $this->setForm($form);

        $this->setChild(
            'form_after',
            $this->getLayout()->createBlock('\Magento\Backend\Block\Widget\Form\Element\Dependence')
                ->addFieldMap($customer->getHtmlId(), $customer->getName())
                ->addFieldMap($email->getHtmlId(), $email->getName())
                ->addFieldDependence($email->getName(), $customer->getName(), '0')
        );
        return $this;
    }
}
ProductSellerInfo/Block/Adminhtml/Edit/0000755000000000000000000000000014364325176017026 5ustar  rootrootProductSellerInfo/Block/Adminhtml/Edit/DeleteButton.php0000644000000000000000000000161514364325176022140 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Block\Adminhtml\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

class DeleteButton extends GenericButton implements ButtonProviderInterface
{
    /**
     * @return array
     */
    public function getButtonData()
    {
        $data = [];
        if ($this->getId()) {
            $data = [
                'label' => __('Delete'),
                'class' => 'delete',
                'on_click' => 'deleteConfirm(\''
                    . __('Are you sure you want to delete the item?')
                    . '\', \'' . $this->getDeleteUrl() . '\')',
                'sort_order' => 20,
            ];
        }
        return $data;
    }

    /**
     * @return string
     */
    public function getDeleteUrl()
    {
        return $this->getUrl('product_seller_info/index/delete', ['id' => $this->getId()]);
    }
}
ProductSellerInfo/Block/Adminhtml/Edit/BackButton.php0000644000000000000000000000125714364325176021600 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Block\Adminhtml\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

class BackButton extends GenericButton implements ButtonProviderInterface
{
    /**
     * @return array
     */
    public function getButtonData()
    {
        return [
            'label' => __('Back'),
            'on_click' => sprintf("location.href = '%s';", $this->getBackUrl()),
            'class' => 'back',
            'sort_order' => 10
        ];
    }

    /**
     * Get URL for back (reset) button
     *
     * @return string
     */
    public function getBackUrl()
    {
        return $this->getUrl('*/*/');
    }
}
ProductSellerInfo/Block/Adminhtml/Edit/ViewPoductEnqury.php0000644000000000000000000000164514364325176023042 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Block\Adminhtml\Edit;

use Magento\Framework\Registry;

class ViewPoductEnqury extends \Magento\Backend\Block\Template
{
    /**
     * 
     * @var Registry
     */
    protected $_coreRegistry;
    
    
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        Registry $registry
    ) {
        $this->_coreRegistry = $registry;
        parent::__construct($context);
    }

    public function getId()
    {
        $model = $this->_coreRegistry->registry('product_seller_info');
        if (isset($model) && $model->getId()) {
            return $model->getId();
        }
        return false;
    }
    
    public function getSellerInfoModel()
    {
        $model = $this->_coreRegistry->registry('product_seller_info');
        if (isset($model) && $model->getId()) {
            return $model;
        }
        return false;
    }
}ProductSellerInfo/Block/Adminhtml/Edit/GenericButton.php0000644000000000000000000000135714364325176022315 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Block\Adminhtml\Edit;

use Magento\Backend\Block\Widget\Context;
use Magento\Framework\Registry;

class GenericButton
{
    protected $context;
    protected $_coreRegistry;

    public function __construct(Context $context, Registry $registry)
    {
        $this->_coreRegistry = $registry;
        $this->context = $context;
    }

    public function getId()
    {
        $model = $this->_coreRegistry->registry('product_seller_info');
        if (isset($model) && $model->getId()) {
            return $model->getId();
        }
        return false;
    }

    public function getUrl($route = '', $params = [])
    {
        return $this->context->getUrlBuilder()->getUrl($route, $params);
    }
}
ProductSellerInfo/Block/Product/0000755000000000000000000000000014364325176015644 5ustar  rootrootProductSellerInfo/Block/Product/ProductSellerInformation.php0000644000000000000000000001006514364325176023354 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Block\Product;

use Magento\Framework\Encryption\EncryptorInterface;

class ProductSellerInformation extends \Magento\Catalog\Block\Product\AbstractProduct {

    protected $_registry;
    protected $_productCollectionFactory;
    protected $urlHelper;
    protected $encryptor;

    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Data
     */
    protected $helper;

    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Email
     */
    protected $emailHelper;

    /**
     *
     * @var \Lof\MarketPlace\Model\SellerFactory
     */
    protected $sellerFactory;

    /**
     * Show seller information
     * @param \Magento\Catalog\Block\Product\Context $context
     * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
     * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
     * @param \Magento\Framework\Url\Helper\Data $urlHelper
     * @param \Magento\Framework\Registry $registry
     * @param \Lof\MarketPlace\Model\SellerFactory $sellerFactory
     * @param EncryptorInterface $encryptor
     * @param \WebbyTroops\ProductSellerInfo\Helper\Data $helper
     * @param \WebbyTroops\ProductSellerInfo\Helper\Email $emailHelper
     * @param array $data
     */
    public function __construct(
            \Magento\Catalog\Block\Product\Context $context,
            \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
            \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
            \Magento\Framework\Url\Helper\Data $urlHelper,
            \Magento\Framework\Registry $registry,
            \Lof\MarketPlace\Model\SellerFactory $sellerFactory,
            EncryptorInterface $encryptor,
            \WebbyTroops\ProductSellerInfo\Helper\Data $helper,
            \WebbyTroops\ProductSellerInfo\Helper\Email $emailHelper,
            array $data = array()
    ) {
        parent::__construct(
                $context,
                $data
        );
        $this->_productCollectionFactory = $productCollectionFactory;
        $this->_catalogProductVisibility = $catalogProductVisibility;
        $this->urlHelper = $urlHelper;
        $this->_registry = $registry;
        $this->sellerFactory = $sellerFactory;
        $this->encryptor = $encryptor;
        $this->helper = $helper;
        $this->emailHelper = $emailHelper;
    }

    /**
     * Check Is Enable module
     *
     * @return bool
     */
    public function isEnableModule() {
        return $this->helper->isEnableModule();
    }

    /**
     * Get current product
     * @return obj
     */
    public function getCurrentProduct() {
        return $this->_registry->registry('current_product');
    }

    /**
     * Get seller data
     * @param int $id
     * @return obj
     */
    public function getLofSeller($_productCollection) {
        return $this->sellerFactory->create()->load($_productCollection->getSellerId(), 'seller_id');
    }

    /**
     * Get param Id
     * @param string $paramId
     * @return string
     */
    public function getParamId($paramId) {
        return $this->encryptor->encrypt($paramId);
    }

    public function getCustomerDisclaimerMessage() {
        return $this->emailHelper->getCustomerDisclaimerMessage();
    }

    public function geReturnPolicyValue($returnPolicy) {
        $returnPolicyOption = [
            null => 'Please Select',
            'thirty_day_buyer' => '30 days after the item is delivered. Buyer pays for return shipping.',
            'sixty_day_buyer' => '60 days after the item is delivered. Buyer pays for return shipping.',
            'ninty_day_buyer' => '90 days after the item is delivered. Buyer pays for return shipping.',
            'thirty_day_seller' => '30 days after the item is delivered. Seller pays for return shipping.',
            'no_returns' => 'No Returns Accepted.',
        ];
        if (in_array($returnPolicy, $returnPolicyOption)) {
            return $returnPolicyOption[$returnPolicy];
        } else {
            return $returnPolicy;
        }
    }

}
ProductSellerInfo/Block/Product/Sellercontactform.php0000644000000000000000000000520314364325176022043 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Block\Product;

/**
 * @class Sellercontactform
 */
class Sellercontactform extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Magento\Framework\App\RequestInterface $request
     */
    protected $request;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Data
     */
    protected $helper;
    
    /**
     * @var \Magento\Catalog\Helper\Image
     */
    protected $imgHelper;
    
    /**
     * @var \Magento\Catalog\Block\Product\AbstractProduct
     */
    protected $abstractProduct;

    /**
     * Sellercontactform constructor.
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\App\RequestInterface $request
     * @param \WebbyTroops\ProductSellerInfo\Helper\Data $helper
     * @param \Magento\Catalog\Block\Product\AbstractProduct $abstractProduct
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\App\RequestInterface $request,
        \WebbyTroops\ProductSellerInfo\Helper\Data $helper,
        \Magento\Catalog\Helper\Image $imgHelper,
        \Magento\Catalog\Block\Product\AbstractProduct $abstractProduct,
        array $data = []
    ) {
        $this->request = $request;
        $this->helper = $helper;
        $this->imgHelper = $imgHelper;
        $this->abstractProduct = $abstractProduct;
        parent::__construct($context, $data);
    }
    

    /**
     * Get raffle id from request data
     *
     * @return obj
     */
    public function getProduct()
    {
        $params = $this->request->getParams();
        if (count($params)) {
            $product = $this->helper->getProductData($params);    
        }
        return isset($product) ? $product : '';
    }
    
    /**
     * Get image url
     * 
     * @param obj $product
     * @return string
     */
    public function getProductImageUrl($product)
    {
        $imageUrl = $this->imgHelper->init($product, 'product_base_image')
//                        ->setImageFile($product->getImage()) // image,small_image,thumbnail
//                        ->resize(380)
                        ->getUrl();
        return $imageUrl;
    }
    
    /**
     * Get product price
     * 
     * @param obj $product
     * @return string
     */
    public function getPrice($product)
    {
        $price = $this->abstractProduct->getProductPrice($product);
        return $price;
    }
    
    /**
     * Get param Id
     * @param string $paramId
     * @return string
     */
    public function getEncryptParam($paramId)
    {
        return $this->helper->getEncryptParam($paramId);
    }
}
ProductSellerInfo/Ui/0000755000000000000000000000000014364325176013547 5ustar  rootrootProductSellerInfo/Ui/Component/0000755000000000000000000000000014364325176015511 5ustar  rootrootProductSellerInfo/Ui/Component/Listing/0000755000000000000000000000000014364325176017122 5ustar  rootrootProductSellerInfo/Ui/Component/Listing/Column/0000755000000000000000000000000014364325176020357 5ustar  rootrootProductSellerInfo/Ui/Component/Listing/Column/Actions.php0000644000000000000000000000476314364325176022502 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Ui\Component\Listing\Column;

use Magento\Framework\UrlInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Framework\Escaper;

class Actions extends Column
{
    /**
     * @var UrlInterface
     */
    protected $urlBuilder;

    protected $escaper;

    /**
     * @param ContextInterface $context
     * @param UiComponentFactory $uiComponentFactory
     * @param UrlInterface $urlBuilder
     * @param array $components
     * @param array $data
     */
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        UrlInterface $urlBuilder,
        Escaper $escaper,
        array $components = [],
        array $data = []
    ) {
        $this->urlBuilder = $urlBuilder;
        $this->escaper = $escaper;
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }

    /**
     * Prepare Data Source
     *
     * @param array $dataSource
     * @return array
     */
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as &$item) {
                $name = $this->escaper->escapeHtmlAttr($item['id']);
                //To set the path for view action
                $item[$this->getData('name')]['view'] = [
                    'href' => $this->urlBuilder->getUrl(
                        'product_seller_info/index/view',
                        ['id' => $item['id']]
                    ),
                    'label' => __('View'),
                    'hidden' => false,
                ];
                //To set the path for delete action
                $item[$this->getData('name')]['delete'] = [
                    'href' => $this->urlBuilder->getUrl(
                        'product_seller_info/index/delete',
                        ['id' => $item['id']]
                    ),
                    'label' => __('Delete'),
                    'hidden' => false,
                    'confirm' => [
                        'title' => __('Delete %1', $name),
                        'message' => __('Are you sure you want to delete a %1 record?', $name),
                    ],
                    'post' => true,
                    '__disableTmpl' => true,
                ];
            }
        }
        return $dataSource;
    }
}
ProductSellerInfo/Model/0000755000000000000000000000000014364325176014232 5ustar  rootrootProductSellerInfo/Model/ResourceModel/0000755000000000000000000000000014364325176017002 5ustar  rootrootProductSellerInfo/Model/ResourceModel/ProductSellerInfo.php0000644000000000000000000000046314364325176023121 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Model\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class ProductSellerInfo extends AbstractDb
{
    /**
     * @inheritDoc
     */
    protected function _construct()
    {
        $this->_init('wt_product_enqury', 'id');
    }
}
ProductSellerInfo/Model/ResourceModel/ProductSellerInfo/0000755000000000000000000000000014364325176022405 5ustar  rootrootProductSellerInfo/Model/ResourceModel/ProductSellerInfo/Collection.php0000644000000000000000000000114614364325176025213 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo;

use WebbyTroops\ProductSellerInfo\Model\ProductSellerInfo as ModelProductSellerInfo;
use WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo as ResourceModelProductSellerInfo;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * @inheritDoc
     */
    protected function _construct()
    {
        $this->_init(
            ModelProductSellerInfo::class,
            ResourceModelProductSellerInfo::class
        );
    }
}
ProductSellerInfo/Model/ResourceModel/ProductSellerInfo/Grid/0000755000000000000000000000000014364325176023272 5ustar  rootrootProductSellerInfo/Model/ResourceModel/ProductSellerInfo/Grid/Collection.php0000644000000000000000000000561514364325176026105 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo\Grid;

use Magento\Framework\Api\Search\AggregationInterface;
use Magento\Framework\Api\Search\SearchResultInterface;
use WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo\Collection as ProductSellerInfoCollection;
use Magento\Framework\Data\Collection\EntityFactoryInterface;

class Collection extends ProductSellerInfoCollection implements SearchResultInterface
{
    /**
     * @var AggregationInterface
     */
    protected $aggregations;

    public function __construct(
        EntityFactoryInterface $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        $mainTable,
        $eventPrefix,
        $eventObject,
        $resourceModel,
        $model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class
    ) {
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager);
        $this->_eventPrefix = $eventPrefix;
        $this->_eventObject = $eventObject;
        $this->_init($model, $resourceModel);
        $this->setMainTable($mainTable);
    }

    /**
     * @return AggregationInterface
     */
    public function getAggregations()
    {
        return $this->aggregations;
    }

    /**
     * @param AggregationInterface $aggregations
     * @return \Hansen\Manufacturers\Model\ResourceModel\Manufacturer\Grid\Collection
     */
    public function setAggregations($aggregations)
    {
        $this->aggregations = $aggregations;
        return $this;
    }

    /**
     * Get search criteria.
     *
     * @return \Magento\Framework\Api\SearchCriteriaInterface|null
     */
    public function getSearchCriteria()
    {
        return null;
    }

    /**
     * Set search criteria.
     *
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \Hansen\Manufacturers\Model\ResourceModel\Manufacturer\Grid\Collection
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null)
    {
        return $this;
    }

    /**
     * Get total count.
     *
     * @return int
     */
    public function getTotalCount()
    {
        return $this->getSize();
    }

    /**
     * Set total count.
     *
     * @param int $totalCount
     * @return $this
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setTotalCount($totalCount)
    {
        return $this;
    }

    /**
     * Set items list.
     *
     * @param \Magento\Framework\Api\ExtensibleDataInterface[] $items
     * @return $this
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setItems(array $items = null)
    {
        return $this;
    }
}
ProductSellerInfo/Model/ProductSellerInfo.php0000644000000000000000000000122414364325176020345 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Model;

use Magento\Framework\Model\AbstractModel;

class ProductSellerInfo extends AbstractModel
{
    /**#@+
     * Freeshippingbar's statuses
     */
    const STATUS_ENABLED = 1;
    const STATUS_DISABLED = 2;
    
    /**
     * @inheritDoc
     */
    protected function _construct()
    {
        $this->_init(ResourceModel\ProductSellerInfo::class);
    }
    
    /**
     * Prepare ProductSellerInfo's statuses.
     *
     * @return array
     */
    public function getAvailableStatuses()
    {
        return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];
    }
}
ProductSellerInfo/Model/Data/0000755000000000000000000000000014364325176015103 5ustar  rootrootProductSellerInfo/Model/Data/ProductSellerInfo/0000755000000000000000000000000014364325176020506 5ustar  rootrootProductSellerInfo/Model/Data/ProductSellerInfo/DataProvider.php0000644000000000000000000000271114364325176023604 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Model\Data\ProductSellerInfo;

use WebbyTroops\ProductSellerInfo\Model\ResourceModel\ProductSellerInfo\CollectionFactory;
use Magento\Framework\UrlInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Ui\DataProvider\AbstractDataProvider;
use Magento\Ui\DataProvider\Modifier\PoolInterface;

class DataProvider extends AbstractDataProvider
{
    protected $collection;
    protected $_loadedData;
    protected $_storeManager;

    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        CollectionFactory $CollectionFactory,
        StoreManagerInterface $storeManager,
        PoolInterface $pool = null,
        array $meta = [],
        array $data = []
    ) {
        $this->collection = $CollectionFactory->create();
        $this->_storeManager = $storeManager;
        parent::__construct(
            $name,
            $primaryFieldName,
            $requestFieldName,
            $meta,
            $data
        );
    }

    //To map data and the form fields
    public function getData()
    {
        if (isset($this->_loadedData)) {
            return $this->_loadedData;
        }
        //Get the collection.
        $items = $this->collection->getItems();
        $this->_loadedData = [];
        foreach ($items as $item) {
             $this->_loadedData[$item->getId()] = $item->getData();
        }
        return $this->_loadedData;
    }
}
ProductSellerInfo/Model/Config/0000755000000000000000000000000014364325176015437 5ustar  rootrootProductSellerInfo/Model/Config/Source/0000755000000000000000000000000014364325176016677 5ustar  rootrootProductSellerInfo/Model/Config/Source/WarrantyPolicyOptions.php0000644000000000000000000000173314364325176023757 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Model\Config\Source;

use Magento\Eav\Model\ResourceModel\Entity\Attribute\OptionFactory;
use Magento\Framework\DB\Ddl\Table;

/**

* Custom Attribute Renderer

*/

class WarrantyPolicyOptions extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource

{

    /**

    * @var OptionFactory

    */

    protected $optionFactory;

    /**

    * @param OptionFactory $optionFactory

    */

    /**

    * Get all options

    *

    * @return array

    */

    public function getAllOptions()

    {

        /* your Attribute options list*/

        $this->_options=[ ['label'=>'Select Options', 'value'=>''],

                            ['label'=>'1 Year Manufacturer warranty', 'value'=>'1'],

                            ['label'=>'2 Years Manufacturer warranty', 'value'=>'2'],

                            ['label'=>'Contact Vender For Warranty Protection', 'value'=>'3']

        ];

        return $this->_options;
    }

}ProductSellerInfo/registration.php0000644000000000000000000000026314364325176016416 0ustar  rootroot<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'WebbyTroops_ProductSellerInfo',
    __DIR__
);
ProductSellerInfo/view/0000755000000000000000000000000014364325176014144 5ustar  rootrootProductSellerInfo/view/adminhtml/0000755000000000000000000000000014364325176016121 5ustar  rootrootProductSellerInfo/view/adminhtml/web/0000755000000000000000000000000014364325176016676 5ustar  rootrootProductSellerInfo/view/adminhtml/web/css/0000755000000000000000000000000014364325176017466 5ustar  rootrootProductSellerInfo/view/adminhtml/web/css/mycssadmin.css0000644000000000000000000000157614364325176022360 0ustar  rootroot.product_enqury_information {
    width: 75%;
    margin: 0 auto;
    border: 1px solid #bdbdbd;
}
.product_enqury_information .row {
    margin-bottom: 1rem;
}
.product_enqury_information .row .col-md-6 {
    display: flex; 
    background-color: aliceblue;
}
.product_enqury_information .row .col-md-6 .col-md-3.product_label {
    width: calc( (100%) * 0.25 - 30px );
    font-size: 1.4rem;
    font-weight: 600;
    color: #303030;
    padding: .6rem 1rem;
    text-align: right;
    margin-left: 30px;
}
.product_enqury_information .row .col-md-6 .col-md-3.product_value {
    padding: .6rem 2rem;
    width: calc( (100%) * 0.5 - 30px );
    margin-left: 30px;
    border-left: 1px solid #bdbdbd;
}
.product_enqury_information .row .col-md-6 .col-md-3.product_value > p,
.product_enqury_information .row .col-md-6 .col-md-3.product_label > p{
    margin-top: .5em;
    margin-left: .5em;
}ProductSellerInfo/view/adminhtml/ui_component/0000755000000000000000000000000014364325176020620 5ustar  rootrootProductSellerInfo/view/adminhtml/ui_component/product_seller_info_listing.xml0000644000000000000000000002512414364325176027140 0ustar  rootroot<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">product_seller_info_listing.product_seller_info_listing_data_source</item>
        </item>
    </argument>
    <settings>
<!--        <buttons>
            <button name="add">
                <url path="*/index/new"/>
                <class>primary</class>
                <label translate="true">Add New Size Guide</label>
            </button>
        </buttons>-->
        <spinner>product_seller_info_columns</spinner>
        <deps>
            <dep>product_seller_info_listing.product_seller_info_listing_data_source</dep>
        </deps>
    </settings>
    <dataSource name="product_seller_info_listing_data_source" component="Magento_Ui/js/grid/provider">
        <settings>
            <storageConfig>
                <param name="indexField" xsi:type="string">id</param>
            </storageConfig>
            <updateUrl path="mui/index/render"/>
        </settings>
        <aclResource>WebbyTroops_ProductSellerInfo::product_seller_info</aclResource>
        <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="product_seller_info_listing_data_source">
            <settings>
                <requestFieldName>id</requestFieldName>
                <primaryFieldName>id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <listingToolbar name="listing_top">
        <settings>
            <sticky>true</sticky>
        </settings>
        <bookmark name="bookmarks"/>
        <columnsControls name="columns_controls"/>
        <filterSearch name="fulltext"/>
        <filters name="listing_filters">
            <argument name="data" xsi:type="array">
                <item name="observers" xsi:type="array">
                    <item name="column" xsi:type="string">column</item>
                </item>
            </argument>
            <settings>
                <templates>
                    <filters>
                        <select>
                            <param name="template" xsi:type="string">ui/grid/filters/elements/ui-select</param>
                            <param name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</param>
                        </select>
                    </filters>
                </templates>
            </settings>
        </filters>
        <paging name="listing_paging"/>
    </listingToolbar>
    <columns name="product_seller_info_columns">
        <settings>
            <editorConfig>
                <param name="clientConfig" xsi:type="array">
                    <item name="saveUrl" xsi:type="url" path="product_seller_info/index/inlineEdit"/>
                    <item name="validateBeforeSave" xsi:type="boolean">false</item>
                </param>
                <param name="indexField" xsi:type="string">id</param>
                <param name="enabled" xsi:type="boolean">true</param>
                <param name="selectProvider" xsi:type="string">product_seller_info_listing.product_seller_info_listing.product_seller_info_columns.ids</param>
            </editorConfig>
            <childDefaults>
                <param name="fieldAction" xsi:type="array">
                    <item name="provider" xsi:type="string">product_seller_info_listing.product_seller_info_listing.product_seller_info_columns_editor</item>
                    <item name="target" xsi:type="string">startEdit</item>
                    <item name="params" xsi:type="array">
                        <item name="0" xsi:type="string">${ $.$data.rowIndex }</item>
                        <item name="1" xsi:type="boolean">true</item>
                    </item>
                </param>
            </childDefaults>
        </settings>
        <selectionsColumn name="ids">
            <settings>
                <indexField>id</indexField>
            </settings>
        </selectionsColumn>
        <column name="id">
            <settings>
                <filter>textRange</filter>
                <label translate="true">ID</label>
                <sorting>asc</sorting>
            </settings>
        </column>
        <column name="product_id" sortOrder='20'>
            <settings>
                <filter>text</filter>
                <label translate="true">Product ID</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="product_name" sortOrder='30'>
            <settings>
                <filter>text</filter>
                <label translate="true">Product Name</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="sku" sortOrder='40'>
            <settings>
                <filter>text</filter>
                <label translate="true">Product SKU</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="price" sortOrder='50'>
            <settings>
                <filter>text</filter>
                <label translate="true">Product Price</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="query_description" sortOrder='60'>
            <settings>
                <filter>text</filter>
                <label translate="true">Query Description</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="seller_id" sortOrder='70'>
            <settings>
                <filter>text</filter>
                <label translate="true">Seller Id</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="seller_name" sortOrder='80'>
            <settings>
                <filter>text</filter>
                <label translate="true">Seller Name</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="seller_email" sortOrder='90'>
            <settings>
                <filter>text</filter>
                <label translate="true">Seller Email</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="customer_id" sortOrder='100'>
            <settings>
                <filter>text</filter>
                <label translate="true">Customer Id</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="customer_name" sortOrder='110'>
            <settings>
                <filter>text</filter>
                <label translate="true">Customer Name</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="customer_name" sortOrder='120'>
            <settings>
                <filter>text</filter>
                <label translate="true">Customer Name</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="created_at" sortOrder='130'>
            <settings>
                <filter>text</filter>
                <label translate="true">Created At</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <column name="updated_at" sortOrder='140'>
            <settings>
                <filter>text</filter>
                <label translate="true">Updated At</label>
                <editor>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">false</rule>
                    </validation>
                    <editorType>text</editorType>
                </editor>
            </settings>
        </column>
        <actionsColumn name="actions" class="WebbyTroops\ProductSellerInfo\Ui\Component\Listing\Column\Actions">
            <settings>
                <indexField>id</indexField>
            </settings>
        </actionsColumn>
    </columns>
</listing>
ProductSellerInfo/view/adminhtml/templates/0000755000000000000000000000000014364325176020117 5ustar  rootrootProductSellerInfo/view/adminhtml/templates/viewpoductenqury.phtml0000644000000000000000000000541714364325176024631 0ustar  rootroot<?php

/**
 * @var WebbyTroops\ProductSellerInfo\Block\Edit\ViewPoductEnqury $block
 */

$model = $block->getSellerInfoModel();
?><div class="product_enqury_information">
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Product Name:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getProductName() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Product Sku:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getSku() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Product Price:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getPrice() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Query Description:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getQueryDescription() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Seller Id:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getSellerId() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Seller Name:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getSellerName() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Seller Email:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getSellerEmail() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Customer Id:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getCustomerId() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Customer Name:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getCustomerName() ?></p>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-3 product_label">
            <p>Created At:</p>
        </div>
        <div class="col-md-3 product_value">
            <p><?= $model->getCreatedAt() ?></p>
        </div>
    </div>
</div>
</div>ProductSellerInfo/view/adminhtml/layout/0000755000000000000000000000000014364325176017436 5ustar  rootrootProductSellerInfo/view/adminhtml/layout/product_seller_info_index_index.xml0000644000000000000000000000052714364325176026603 0ustar  rootroot<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <uiComponent name="product_seller_info_listing"/>
        </referenceContainer>
    </body>
</page>
ProductSellerInfo/view/adminhtml/layout/product_seller_info_index_view.xml0000644000000000000000000000103714364325176026443 0ustar  rootroot<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="WebbyTroops_ProductSellerInfo::css/mycssadmin.css" />
     </head>   
    <body>
        <referenceContainer name="content">
            <block class="WebbyTroops\ProductSellerInfo\Block\Adminhtml\Edit\ViewPoductEnqury" template="WebbyTroops_ProductSellerInfo::viewpoductenqury.phtml"/>
        </referenceContainer>
    </body>
</page>
ProductSellerInfo/view/marketplace/0000755000000000000000000000000014364325176016434 5ustar  rootrootProductSellerInfo/view/marketplace/templates/0000755000000000000000000000000014364325176020432 5ustar  rootrootProductSellerInfo/view/marketplace/templates/seller/0000755000000000000000000000000014364325176021720 5ustar  rootrootProductSellerInfo/view/marketplace/templates/seller/marketplace/0000755000000000000000000000000014364325176024210 5ustar  rootrootProductSellerInfo/view/marketplace/templates/seller/marketplace/editprofile.phtml0000644000000000000000000005205014364325176027566 0ustar  rootroot<?php
/**
 * Landofcoder
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Landofcoder.com license that is
 * available through the world-wide-web at this URL:
 * https://landofcoder.com/terms
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category   Landofcoder
 * @package    Lof_MarketPlace
 * @copyright  Copyright (c) 2021 Landofcoder (https://www.landofcoder.com/)
 * @license    https://landofcoder.com/terms
 */
$helper = $this->helper("Lof\MarketPlace\Helper\Data");
$sellerHelper = $this->helper("Lof\MarketPlace\Helper\Seller");
$wtSellerHelper = $this->helper("WebbyTroops\ProductSellerInfo\Helper\Data");
$seller = $sellerHelper->getSellerByCustomer();
$returnPolicies = $wtSellerHelper->getReturnPolicyOption();
$sellerId = $seller['seller_id'];
$twitter_id = $seller['twitter_id'];
$facebook_id = $seller['facebook_id'];
?>
<form class="entry-edit form-inline editprofile" action="<?= $block->getUrl('catalog/saveprofile', ["_secure" => $this->getRequest()->isSecure()]) ?>" enctype="multipart/form-data" method="post" data-role="form-profile-validate" data-mage-init='{"validation":{}}'>
    <input type="hidden" name="store_id" class="admin__control-text" value="<?= $helper->getCurrentStoreId(); ?>" />
    <div class="lof-mp-page-title page-title">
        <h2><?= __('Edit Profile Information') ?></h2>
        <div class="page-actions-buttons">
            <div class="actions-split save primary" title="Save">
                <button class="action-default primary" title="<?= __('Save Profile') ?>" type="submit">
                    <span><span><?= __('Save Profile') ?></span></span>
                </button>
            </div>
        </div>
    </div>
    <div class="fieldset-wrapper admin__collapsible-block-wrapper">
        <div class="fieldset-wrapper-title" data-toggle="collapse" data-target="#general">
            <strong class="admin__collapsible-title">
                <?= __("General"); ?>
            </strong>
        </div>
        <div id="general" class="admin__fieldset-wrapper-content">
            <fieldset class="admin__fieldset" name="general">
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Contact Number"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="contact_number" class="admin__control-text" value="<?= $seller['contact_number']; ?>" />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Shop Title"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="shop_title" class="admin__control-text" value="<?= $seller['shop_title']; ?>" />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Company"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="company" class="admin__control-text" value="<?= $seller['company']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Company Locality"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="company_locality" class="admin__control-text" value="<?= $seller['company_locality']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Phone Number"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="telephone" class="admin__control-text" value="<?= $seller['telephone']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("State/Province"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="region" class="admin__control-text" value="<?= $seller['region']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("City"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="city" class="admin__control-text" value="<?= $seller['city']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Address"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="address" class="admin__control-text" value="<?= $seller['address']; ?>" />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Country"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="country" class="admin__control-text" value="<?= $seller['country']; ?>" />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Zip/Postal Code"); ?>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="postcode" class="admin__control-text" value="<?= $seller['postcode']; ?>"  />
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Company Description"); ?>
                    </label>
                    <div class="admin__field-control">
                        <textarea rows="7" id="company_description" type="text" name="company_description" class="admin__control-text" value=""><?= $helper->filter($seller['company_description']); ?></textarea>
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label Gaurav Khatri">
                        <?= __("Return Policy"); ?>
                    </label>
                    <div class="admin__field-control">
<!--                        <textarea rows="7" id="return_policy" type="text" name="return_policy" class="admin__control-text" value="" ><?= $helper->filter($seller['return_policy']); ?></textarea>-->
                        <select id="seller_return_policy" name="return_policy" title="Return Policy" class=" required-entry _required select admin__control-select" data-ui-id="adminhtml-seller-edit-tab-main-0-fieldset-element-select-return-policy" aria-required="true">
                            <?php foreach($returnPolicies as $key=>$returnPolicy) { ?>
                            <option 
                                value="<?=$key?>"
                                <?php if($seller['return_policy'] === $key) {
                                    echo "selected";
                                } ?>
                            ><?=$returnPolicy?></option>
                            <?php } ?>
                        </select>
                    </div>
                </div>
                <div class="admin__field">
                    <label class="admin__field-label">
                        <?= __("Shipping Policy"); ?>
                    </label>
                    <div class="admin__field-control">
                        <textarea rows="7" id="shipping_policy" type="text" name="shipping_policy" class="admin__control-text" value=""><?= $helper->filter($seller['shipping_policy']); ?></textarea>
                    </div>
                </div>
            </fieldset>
        </div>
    </div>

    <div class="fieldset-wrapper admin__collapsible-block-wrapper">
        <div class="fieldset-wrapper-title" data-toggle="collapse" data-target="#images">
            <strong class="admin__collapsible-title">
                <?= __("Images"); ?>
            </strong>
        </div>
        <div id="images"  class="admin__fieldset-wrapper-content admin__collapsible-content">
            <fieldset class="admin__fieldset">
                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Company Banner') ?></span>
                    </label>
                    <div class="admin__field-control">
                        <div class="image image-placeholder">
                            <div class="uploader">
                                <div class="fileinput-button form-buttons button">
                                    <input type="file" id="image" name="image" title="Company Banner" />
                                </div>
                            </div>
                            <div class="product-image-wrapper">
                                <p class="image-placeholder-text">
                                    <?= __('Browse to find or drag image here(Size 1240x400)'); ?>
                                </p>
                            </div>
                        </div>
                        <?php if ($seller['image']) { ?>
                            <div class="image">
                                <img src="<?= $helper->getMediaUrl() . $seller['image']; ?>" title="<?= $seller['image']; ?>" alt="<?= $seller['image']; ?>"  width="150" class="small-image-preview v-middle" data-ui-id="adminhtml-seller-edit-tab-main-0-fieldset-element-file-thumbnail">
                            </div>
                        <?php } ?>
                    </div>
                </fieldset>
                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Company Logo') ?></span>
                    </label>
                    <div class="admin__field-control">
                        <div class="image image-placeholder">
                            <div class="uploader">
                                <div class="fileinput-button form-buttons button">
                                    <input type="file" id="thumbnail" name="thumbnail" title="Company Logo" />
                                </div>
                            </div>
                            <div class="product-image-wrapper">
                                <p class="image-placeholder-text">
                                    <?= __('Browse to find or drag image here(Size 200x200)'); ?>
                                </p>
                            </div>
                        </div>
                        <?php if ($seller['thumbnail']) { ?>
                            <div class="image">
                                <img src="<?= $helper->getMediaUrl() . $seller['thumbnail']; ?>" title="<?= $seller['thumbnail']; ?>" alt="<?= $seller['thumbnail']; ?>"  width="150" class="small-image-preview v-middle" data-ui-id="adminhtml-seller-edit-tab-main-0-fieldset-element-file-thumbnail">
                            </div>
                        <?php } ?>
                    </div>
                </fieldset>
            </fieldset>
        </div>
    </div>
    <div class="fieldset-wrapper admin__collapsible-block-wrapper">
        <div class="fieldset-wrapper-title" data-toggle="collapse" data-target="#social">
            <strong class="admin__collapsible-title">
                <?= __("Social Media"); ?>
            </strong>
        </div>
        <div id="social"  class="admin__fieldset-wrapper-content admin__collapsible-content">
            <input type="hidden" id="seller_id" name="seller_id" title="Seller ID" value="<?= $sellerId; ?>" />
            <fieldset class="admin__fieldset">
                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Twitter ID') ?></span>
                        <input type="checkbox" name="tw_active" value="<?= $seller['tw_active']; ?>" <?php if ($seller['tw_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="twitter_id" id="twitter_id"  class="admin__control-text" title="Twitter ID" value="<?= $seller['twitter_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Facebook Name') ?></span>
                        <input type="checkbox" name="fb_active" value="<?= $seller['fb_active']; ?>" <?php if ($seller['fb_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="facebook_id" id="facebook_id"  class="admin__control-text" title="Facebook ID" value="<?= $seller['facebook_id']; ?>">
                    </div>
                </fieldset>
                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Facebook Page ID') ?></span>
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="page_id" id="page_id"  class="admin__control-text" title="Facebook Page ID" value="<?= $seller['page_id']; ?>">
                    </div>
                </fieldset>
                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Instagram ID') ?></span>
                        <input type="checkbox" name="instagram_active" value="<?= $seller['instagram_active']; ?>" <?php if ($seller['instagram_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="instagram_id" id="instagram_id" class="admin__control-text" title="Instagram ID" value="<?= $seller['instagram_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Google Plus ID') ?></span>
                        <input type="checkbox" name="gplus_active" value="<?= $seller['gplus_active']; ?>" <?php if ($seller['gplus_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="gplus_id" id="gplus_id" class="admin__control-text" title="Google Plus ID" value="<?= $seller['gplus_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Youtube ID') ?></span>
                        <input type="checkbox" name="youtube_active" value="<?= $seller['youtube_active']; ?>" <?php if ($seller['youtube_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="youtube_id" id="youtube_id" class="admin__control-text" title="Youtube ID" value="<?= $seller['youtube_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Linkedin ID') ?></span>
                        <input type="checkbox" name="linkedin_active" value="<?= $seller['linkedin_active']; ?>" <?php if ($seller['linkedin_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="linkedin_id" id="linkedin_id" class="admin__control-text" title="Linkedin ID" value="<?= $seller['linkedin_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Vimeo ID') ?></span>
                        <input type="checkbox" name="vimeo_active" value="<?= $seller['vimeo_active']; ?>" <?php if ($seller['vimeo_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="vimeo_id" id="vimeo_id" class="admin__control-text" title="Youtube ID" value="<?= $seller['vimeo_id']; ?>">
                    </div>
                </fieldset>

                <fieldset class="admin__field">
                    <label class="admin__field-label">
                        <span><?= __('Printerest ID') ?></span>
                        <input type="checkbox" name="pinterest_active" value="<?= $seller['pinterest_active']; ?>" <?php if ($seller['pinterest_active'] == 1) {
                    echo 'checked';
                } ?>  style="margin: 5px;">
                    </label>
                    <div class="admin__field-control">
                        <input type="text" name="pinterest_id" id="pinterest_id" class="admin__control-text" title="Printerest ID" value="<?= $seller['pinterest_id']; ?>">
                    </div>
                </fieldset>
            </fieldset>
        </div>
    </div>
<?= $block->getChildHtml('additional_fields'); ?>
</form>
<script type="text/javascript">
    require([
        'jquery',
        'mage/adminhtml/wysiwyg/tiny_mce/setup'
    ], function (jQuery) {
        jQuery(document).ready(function () {
            jQuery('input[type="checkbox"]').each(function () {
                jQuery(this).bind('change', function () {
                    if (jQuery(this).prop('checked')) {
                        jQuery(this).val(1);
                    } else {
                        jQuery(this).val(0);
                    }
                });
            });
            jQuery(window).on("load resize", function (e) {
                console.log(jQuery(window).width());
                if (jQuery(window).width() >= 768) {
                    wysiwygcompany_description = new wysiwygSetup("company_description", {
                        "width": "99%", // defined width of editor
                        "height": "200px", // height of editor
                        "plugins": [{"name": "image"}], // for image
                        "tinymce4": {"toolbar": "formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap", "plugins": "advlist autolink lists link charmap media noneditable table contextmenu paste code help table",
                        }
                    });
                    wysiwygcompany_description.setup("exact");

                    wysiwygcompany_description = new wysiwygSetup("return_policy", {
                        "width": "99%", // defined width of editor
                        "height": "200px", // height of editor
                        "plugins": [{"name": "image"}], // for image
                        "tinymce4": {"toolbar": "formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap", "plugins": "advlist autolink lists link charmap media noneditable table contextmenu paste code help table",
                        }
                    });
                    wysiwygcompany_description.setup("exact");

                    wysiwygcompany_description = new wysiwygSetup("shipping_policy", {
                        "width": "99%", // defined width of editor
                        "height": "200px", // height of editor
                        "plugins": [{"name": "image"}], // for image
                        "tinymce4": {"toolbar": "formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap", "plugins": "advlist autolink lists link charmap media noneditable table contextmenu paste code help table",
                        }
                    });
                    wysiwygcompany_description.setup("exact");

                }
            });
        });
    });
</script>
ProductSellerInfo/view/marketplace/layout/0000755000000000000000000000000014364325176017751 5ustar  rootrootProductSellerInfo/view/marketplace/layout/catalog_seller_index.xml0000644000000000000000000000175514364325176024652 0ustar  rootroot<?xml version="1.0"?>
<!--
* Landofcoder
*
* NOTICE OF LICENSE
*
* This source file is subject to the Landofcoder.com license that is
* available through the world-wide-web at this URL:
* https://landofcoder.com/terms
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category   Landofcoder
* @package    Lof_MarketPlace
* @copyright  Copyright (c) 2021 Landofcoder (https://www.landofcoder.com/)
* @license    https://landofcoder.com/terms
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="vendor-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="editprofile">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">WebbyTroops_ProductSellerInfo::seller/marketplace/editprofile.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>
ProductSellerInfo/view/frontend/0000755000000000000000000000000014364325176015763 5ustar  rootrootProductSellerInfo/view/frontend/web/0000755000000000000000000000000014364325176016540 5ustar  rootrootProductSellerInfo/view/frontend/web/css/0000755000000000000000000000000014364325176017330 5ustar  rootrootProductSellerInfo/view/frontend/web/css/mycss.css0000644000000000000000000000262614364325176021206 0ustar  rootroot.block-content-message-box {
    margin-top: 15px;
}
.block-content-message-box .field.required  {
    margin: 0 0 5px;
}
.block-content-message-box .fieldset > .field:not(.choice) > .label {
    width: 8.9%;
    text-align: left;
    padding: 6px 6px 6px 0;
}
.block-content-message-box .fieldset > .field:not(.choice) > .control {
    float: none;
}
.block-content-message-box .field.required .label .control > textarea {
    border: 2px solid #000;
}
.fieldset.login .row .col-md-9 {
    margin-bottom: 5px;
    text-align: justify;
}
fieldset.login .action button{
    background: #fb6c1c;
}
.policy-section-icon-col {
    /*width: 32px;*/
    padding-right: 0px;
}
.policy-section-icon {
    /*font-size: 24px;*/
}
.policy-section-label {
    color: #FF384B;
    font-weight: 700;
}
.policy-section-content {
    
}
.product-sidebar.seller-info .block-product-seller-info .row {line-height: 30px;}
.block-product-seller-info .row {margin-bottom: 10px;}
.product-sidebar.seller-info .block-product-seller-info .row p, 
.product-sidebar.seller-info .block-product-seller-info .row a, .product-sidebar.seller-info .block-product-seller-info .row p strong {color: #000;}
.product-sidebar.seller-info .block-product-seller-info .row a:hover {color: #FF384B}
.product-sidebar.seller-info .block-product-seller-info .policy-section-ship {
    color: red;
}
.policy-section-ship:before {
    content: url('../images/shipped.png');
}
ProductSellerInfo/view/frontend/web/images/0000755000000000000000000000000014364325176020005 5ustar  rootrootProductSellerInfo/view/frontend/web/images/disclaimer.png0000644000000000000000000000165114364325176022632 0ustar  rootroot�PNG


IHDR22?��bKGD�������^IDATh���kA�cF�ƍ(q��$.��x1x��<$F�O�"A/

���IQ��((FA=����-j\'�,��^3�No�S�3���`������kkHK�+@?��u	�6��g �(߀�"���Z�0�����?�B�n��|qh��`������/�DŽ9���n��� /�	�~�
|.��SQ�El��VI�g���4���t�=HH����0>�c��	|Gu�s��Ϸ�2���f��+j��x7
't�}b��Cj���`/05�͒r5B���
�;�j��D�`XM��&�+٦e	�ن#�1�(BJe!����RCYH��,�ԐN G*���Q�&�V���~�<E��{(�Ax�ZM�9�M�6%�qwQ3�HHZ�a���)�f�ߑ�����~�lv�5�߻������߻]��_�Њ(���l��ր-�
�F�:K���q�#F�Կ��	?!�l��>�6��.�}��{���2�7��%�DPӲu��`	y
��(>/(`�+Lq#F@/j����o�Y`y8������oN�D�džz`�w�!���V�$���( o�c�Nge�ߔ�o���B�p�PR�rC�\��d�@��w�lV3ۯ��I�6j1
�����'t�Ԓ[������'<��HL�'�	u�4Ei?�)�k�{FL�>Y܏�L�zjY`Y\I^I�51ŷzns1c8�r0��U�Wl8C�1�$��3�M$v/���/	{03;H'%�[`�������B��:��)�E�f��
����P�dB\;X	�#�:�uyb�A�g���򄱧�ECp
���B�*��{؂�����N����IEND�B`�ProductSellerInfo/view/frontend/web/images/shipped.png0000644000000000000000000000143614364325176022153 0ustar  rootroot�PNG


IHDR22?��bKGD��������IDATh��ϏA�?�vwH�"�lH�q���M$²ٻ8���%"{ۃu�M����č?KbI0��d��"&��Ng��������o�M�{�o}��_W
888888dC��^��,�md� �qɶ��B��6qv�����HX��I�M8#	PV�ȿy�#���X��|G|w{��ĉ�6�x$�
`�F�$�:a�F������9�`>��;��'�3Jܖ��p}6kru�acK�k�-�Ɣ`�i�}\�����\S#}��GH�ґV�g���	�Y����%�ԍ�G���1)@u����~��͸�O�Z���
j)�m�70�_=ആ�d�I����D��ąe�䵀#�.�<;So2�$���$�I!@	8�N��xV#Qߖyd˛��SR��Iw̱a`Br���8�F-q�4�D,;1(���H�Ns,0�4Zq�yA�ً2��L)@X�mڋaS�w�����Y�:�<F}��P��Q�W�&Rk�u�:��1�~�M��Fk�Kg� ~	��ԵsFƦQ��,F�j%22*c
�/W����F�j-p���!��lH3���s?v�!��Fh�GEEC^MPoi��@�q�+cJ^+�H�VSL�jj��r�~O�|k�uR
gW���p̔�H�~T�W���*1 ~�Y��V= ��,��*��~
�&�8A��視��ÿ�?���w7a�IEND�B`�ProductSellerInfo/view/frontend/web/images/rma.png0000644000000000000000000000142714364325176021276 0ustar  rootroot�PNG


IHDR22?��bKGD��������IDATh��O�MQ�?��4z%��"KM(jv^���b���f�?R�0JH��z��R�4�X
������5��̳8��;��s�;�߻�S�{����;����� ���P�X�FQ��Е�6"�x���k�uN��;S����d-�%쒅�9�6$�+[����~���'���B��
��!�3��߮��
��+�4�}]LQW`�����dU��;46���TE�<�RJYKNN\<"��٤˸[t�H=|t�&�sm3������ɏ<��g �İ��%�$�B:��U����Hl�d�<�������f��`��W�|z��h�C}�V�R<#��7`p8��;`i�)k��j�`�p�Fy.g�Q��3������t�;o�W��R_�92��`����:���l��Rg�W޹�[���C�ɾU�5����]}([է=G�*�֖V_�&._���z��Ǜ�p8�԰Ŝ�.`��}u�]V��\'�	�f��0p��
*���#�W�^԰{�j^��Ą�d,�W]~�d���I�A�4�Rl���u�K�S&-�#������2�-e�$X�Aఔ�b[Mc�&#OŦO^wo/Fm���e>>��A˄ԝh�/ҪuZ���5>>�����>��8ߘ��\�W/��1M�@�F�
1��ă)#;�"8���$�v�j
�OIEND�B`�ProductSellerInfo/view/frontend/web/images/publicsafety.png0000644000000000000000000000243314364325176023207 0ustar  rootroot�PNG


IHDR22?��bKGD��������IDATh���UE�?{���\��jM7+L�jS*�|SBD��D�^�	�)���!�=cD�[(AA�=-�KZ�f[���I��hvm�ۋ�o����3gΙs5�/��sߙ���of��Q��EX��g�tF�D	x�T�������q:��ư��g(�}Le�T7�CRW�[��>�0�7S�_tDt*�6�
`0�ߋ�C@7pk��_��P��e�B�{p$�Bq��6<�=�W{؞<|�{�ح��"�GLOt���EH˷��cH�&=*P�;O��(�q`	�^岇=s!�'q��iD4:v#�P��F-=��H���ZUz�A����6�RP�.h����p9���T؊����Ie�]���
�-���(#��8WE�ղ3�D?�h�p�.N�5��jy] ��HX��p�'���Z^@����ߌv.��
�%�ft�
�b��s\mLˢ\P�$A�c+�=�Τ�ȴ�iReW�l�P;qܦ�G��(
����`#�12C��I`1�4N i�/�{�ʼ��:�{$I����E���~���J�P�DZa8A�|C�Ի��Yڑ�'3Hr쏨�q��\��'edP īH��AZ��=���(�X���{�p�B9�I��A7�
<���S:��c7S�x��Q���\+�\-�t�؈�J���%�}�g6o{���TWE��ҷ"`g�"�S���# �_!�y��|#Ck���)?f�� I!~L�_AV�qfЭ�V��O���+���X�E,)��~g���L��T��8W��j�Z���PiG��L]O�l	�D���z5�ߗ���
G�Vp)���O��Ï9�w��b�*_�EY�
B;�,#v1tM�f�9��ˑ���ܤ�S*k�V�@��9�-�H�<�E�Y�N q���넬�P�!<6!-�.�H�ה�6�N!�AȠ����_�=<�j,Z�S�
�fg`��N�=`��)�%/��`�wI����yȵ���B��jp�X�8?oH�8�����M�n��
��s�=G�u�{P^ ,Ԋ�	K{ر(��7fb/^*H�
�o_4#��f�c.��re���0Cdx������@nG"z�{��Ed���)��$L��_����Y05
Hm&~7X�6#=�ʾ�hV� �Ń��ϫ�s8����m�T�XIEND�B`�ProductSellerInfo/view/frontend/web/images/conactseller.png0000644000000000000000000000644414364325176023201 0ustar  rootroot�PNG


IHDR``�w8sBIT|d�bKGD��������IDATx��\mo�~f�a7il�
�h�iB^��T�Ui�h"h�?я�PUU�_(��/E�E���*J!�N��4$qbB��8&Y�ޝ�;3��s_��z�I�<֞�;�<�9�2k*T�P�B�
*T�P�B�
*T����˧�C�������b	��1�3Dx��^�Ճˇ���
�3/�n�Z�cV�M��H�&�/�z��ʶ#Qs~��~%�OP�%���{}D��K�g_-�Í�3��e��KᡄGJ��A��K�g^-���gz]�S�SUm�gmӑ���(ze������gz_��§��FFrC�_�����-3Z��>k‹?�j�#�*�'���|5Cڛ�,1�C���|m��E�q�����5�OQ�7�_4��.|X��'Z�2�"a���.u{���N�� A���c�Q��W���~��cp���O��2��5&մVf�9��G��Qb%�O�8�ܙ�4&�/wZ�KͨYK�F	7X����+j���6����!���ЛI�"�rM	�\�3&70��
4^��s�!���H��l���\z�$zʚ_��郻�e��uz_Ye���Wf�,��)�?��p��	��bf�it�����7��p�z��w�bVCĴps''�
�gH:gq�/��lw“�F�H�#���D;7o؅�\L��ٶ9g�>ds�,TfF� ��2Sd$
{Y���K�v��g��{�L�ٮߜ���!w�tRM~�g��=���lO>B��8�������z1�؞��>흒ʌ�e���DW�	��R΁.xVA�Y�/3�v#c�q��YL��V���a��M�뫙�	ѕ�µ��[�P��w�6䌀�2���׮7��_����3Zߗ��¥/�pb��x��c��#��e��I՗��p?��� |��n������s\���7�y�V�8"(�SE�M���g�.���S͌�|ƍi�#��9���E0'd�.�3�0rr�g�xLwpy�
N��֜�9!�ǧ#���~D��cb&����B�,TRؓ� �F�3t'���9�ecg�功�ԙs��r.{�.� ��s���^�ƕ��H4�S��{�N8嚲�;���ӳ��:�gg���d��T��97)HФ�ugr�In����u��q5�"B��\�^�3i�֫IU�I��;��[���@��痧�X98�`1K�v]x#۵v��?!tn9s@کX1�/l2CR?��y�N���G��퓪1�d���a"3�m�*_ie5�To�IU�`��	�wK7�BфgyAl�t?֬��c���+o�7ؘ9''|�\&�eR�VO�I��M��DžW�h�ۄ��$���ROD?��1\닰������\��^9��?�.jQd�efb�}��7�}.-�F�wm�;�Y�iZ�d?p�w(�f��� ˖��Ծ����z3��h�� �o[6mD�V˩�*>�}x�t��ٜ�}���8�Y)xVAzA+"<7Y�jغy�nޤ���ʆ��o�v��1�֌'�,�[�N��lBR4����k��5;�I�Ty�f�6��M��#;�,=S*�F�ڵ��M��s[�(��]�ݻ�v~���ux��7և��,a�+K�qhdz�ÿs��^P�6��Zۛl�n�nK[92�"l#fq�3�Y ��8{~g/Nbj�
�]o�/k`���q����P��„��D;�B#�ݬ�'F� �sq�;rG@�2ӹ�Ӊ��DZ�}y��{��f���̹	���r�ޱ
�lX���sa�Y�m�q�Yd$�
�=��ԉ�G��b��)�Y��/��ݿ���#ۿ�(��s�y��v���8|t�%�<�c�\�֓�f�p���D�nPߩ���j������qt�[UYv�Y@Ln��~\��@gp��(�+>�Yya��("�	��T�wz�����Е�)FO���I�|d����`�a�n�&���#ɠ�{�]��Ƒ��E;���(��غ�H�rʃ���w=�F��h�yh��صc�ܶ&�Y.m��$'��k��&�nQ|y�:.L~��
�M�wݱ?ݻGq6�(�s�Z�(:��ֿ�[���IJ���T�]��[*���2#�]�;dp�#T��3�� �N��E�L��R=\�ZJڥ-���x*�|(�g�d6mٮ�t��lg/"�s�����&��s�*�{�2�~1���\�\oΛBH��z�v����S}�z����j�C�Ղ=��ةN~�/|xl����
�z;ڂuk�����R�H�����L=�V۳��j6���h�����<�G>aܠi$��cRG��RY����+��]����6G��Q��Ӑ��=��(�e*(�=�cے��۰}�}/IJ]r�|1˖��M����I�εk�oϣ��jPƤ�H��Ϡ?Q�2�^9�=�M�X[��Y*٫�!�jZf�R)�6���e;3Vr�;g��V<ۑ�?��Kr{���(/");,c��f۳]r+���~�v�����F��f��4T�F]8�;Tf1��EkV��Hn6��@���H���=:��<�x��_�q.CvnYKyf�t�^��v��iܘF���͍�?QB�3�Ff8�;��'{�X3Jfq�P��g��D�	/��W=�T�m�5�y7�As��X䈀�v‰�tN���e��IUpfA�QL|i��<�ީsd8�4EOz�=��~�/������`k�T�Dr�@��l��Y��m�͕�͙��%�aЊ��lGʌ-@�lO>�d�LNz��j��g��9��,���Nΰy �y@b9�̈�!�w8!�Ӎ\����>���C��N5X\��heƑ�[�2SD��F)��8��7����t!��հӹ��֌*��:���68�"bœ��<PB�rD�(�mx�Drǘ�Z��B��4��q�1�ubO�>yD@��-="��F3�MD?���ǷDQ�4c��k�1�������QL�P
O�^wUfX�a��Z;��:���7?~���[�#��R�"LЭ};������0"�D���A�G�Z��� ����9�?w@w�'��D��U�(�b��z�Ce��Ƴ�<K2����A����v	�h��=���?��Z���j�;�i�&��7棷]�����ߒfVY	�e�n��u�������E菣�o=���⻫P�B�
*T�P�B�
*T�P�B��e�F�K��IEND�B`�ProductSellerInfo/view/frontend/web/images/sellerchat.png0000644000000000000000000000554514364325176022652 0ustar  rootroot�PNG


IHDR@@�iq�sBIT|d�bKGD�������
IDATx��ZilT��ν�͆7lc��6	��(�qHDR
Iӄ�&i��4`�i��UEMR�(R����6TlB��4���� �4���`6���񊗱=3��{��f�=3�ǞXm�I�Y޹�|��r�����:�#7���O�$�������1�d�BO���ܖ���q܃�J��h��\Hp�z��5Me����G-�#wy!I�^Ov�t2G�k@���yHJ�3�h'*.�V�V�qb�~�:#ּ�m�훁�����)b62��`H��&0�`�	6�l��!��`�k����rG�>%Ncrv��w����.�	U��K!�8�h�|�Q�r��g��S����?�ߺ&	Q�c.��УP�&�'4�])��/��Ό�VoN^�2��A��;v�
�H�������}0���"�pٗ �@`߆]aLv;f��-e)�$h�`�/P��r�K���`Q��ո	�y�4���G?=���ͯ:�%Ŀ�Q��s&�Gɸ;���ωj�Q��v�n�Þ���[ ϕ�Ο�"|��
�Y�������H���E�y�W9mt&|-�|-�H��/.�"
}����Ą-�x\X2���ڪ����:@T{Am��40�_\�>*y8�q���y!?����W�?+�~��o�h���a��� g.��=�*c�w�$w�mq�wdm]܃�G�mq�Ld���	u���,Y�4r�����C
�T�>K�36P�2�%�j�-Om7�T��\�b>���<����`���9+)@k<��8���F?�0�=&tP����8�av���J�%�MIy��͂�/��Hp�ke�����{���4�B8r��'`1�yF�)@��@�h
JR.��&r�%�P=Lo��Q.��Kh�:��1�9�D�ڌNr�E-Z��]:+X2z9�JG%�#�� ��a`a��͛פ�=�P���
���E�&l
�XT�F���	�R� 6�6�;f]�,ƻ���O�3�L&�	�)a���6�T5+0��Y����m]���p�T5�����M��̤���]��pva{����d�3��s��ͩ\1���
Tǻ���~�-H��H��RQ����;P�����O+e�<��=�H�M�I�	��aN�n�ns�At��̯X*D�Ae�p�U��I ׄ4��
�|]x�I<6եsF��)��s�X()Xu�w�����+^{$W��p��O]��K��sR���@Y5Pل6ɘ�PcA��]5�\��5��8�jc�?�̴��;1#��DF��n��z��f��~'
�.���6UMAT5P�Į�u���8����*��q��f�ĵ�>C�Je��f�����l
��.�[��HVR�IIG
�83S2�`�?/��ˊ�<tk�d��@/`�I�m���]x��T���J����u��X0e�ذϋ�u�j���9D�?��d�`NRL���).�\0+�_�oē:�_ ԏD�����3s���M_�˛9�̩+B
��Q��`��h�X��,"������k����5����r���Rok��V����>7&y	��C��tV��z�WآA{6��u�}Thl=V�ѽ\%���=n=Vݧv��Uۚ�3�񅲉0�5Wڍ
��W}��BM6�28���ۗ8��U�(ܸ�J_��}I��?^T4�
�bM8���7l!�7��S��=kj���u'�f���N�Y����h�M/�;�{3�/o��[�+oS%�?	gql���ŧ~pLm*�D���DE�X��i�J�sQ���e_a�����j����a]�
٣�5����|pL)��-��H~{,�9s��BD`��zf�(y��8��r};v���=�n3���@I���$�[8s�?'�"`�d���LqA)��^6�R�~	̼8PR�a$�~2��Ӱ�l~��"���1I�~�T��tN^�T,��t'�����л�n�A&0?|�˦��m!g����z`Ik��f��c��y�����ј;ރ�bx�,�یщ���
6V�B���`�.�Q��qdmߎ�N[n:
�=w��O�d��+YHt	4�M6<�@F��$�І���� �c����0	���n8g䯂���Ҝ�#�]3.�Qhn�ON����}iN8BE����m(8ܠ���쉓��Ne[��kJ��J&q���#k{�8���<�2�6����G��0:7s�
��NtiΟ>\~w�0d&�،����6��3> >A�wM�}B��
t�"�_��f���5+�'>T�š�p����
�8X��>Ł@�c���[�aϞK���-YzƎ���v�����>#!�؏-���t�N�50����	t-��۩�)��=s`v9F���	dٗP�����M����U��Q֢��HK
Q�ݨ��%@gdv��C{am�M�c(��֙��0��s�=㡈~�CTU�|̀����i������-ꪽ��
�-��X���gGnB@�g陑���Y�SK������$�=uV�;U�zlN��@H�i��ܾ9�1cY�0������/0L�ǭ�ǃB��n��u���Q�цNRw.��=u(�����"ŸL�I����?�l��o�����q���E�����ؖ_�:~7P���[�
��̐���E��B�c�X���u9�A��?������6IEND�B`�ProductSellerInfo/view/frontend/templates/0000755000000000000000000000000014364325176017761 5ustar  rootrootProductSellerInfo/view/frontend/templates/sellercontactform.phtml0000644000000000000000000001150214364325176024554 0ustar  rootroot<?php
/**
 * Create contact seller form template
 *
 * @var $block \WebbyTroops\ProductSellerInfo\Block\Product\Sellercontactform
 */

/* Get current product data collection */
/* @var obj */
$product = $block->getProduct();
//echo "<pre>";
//print_r($block->getEncryptParam($product->getSku()));
//die;
if ($product) { 
    $imageUrl = $block->getProductImageUrl($product);

?>
<div class="block block-customer-login">
    <!-- <div class="block-title">
		<strong id="block-customer-login-heading" role="heading"
			aria-level="2">< /* @escapeNotVerified */ echo __('Registered Sellers') ?></strong>
	</div>-->
	<div class="block-content">
            <div class="row">
                <div class="col-md-2">
                    <img src="<?= $imageUrl ?>" alt="<?= $product->getName(); ?>" style="width: 200px;">
                </div>
                <div class="col-md-8">
                    <h3 style="color: #222;"><span style="text-transform:uppercase"><?=  $product->getName(); ?></span>
                    <?php if ($product->getData("size") || $product->getData("weigh")) :?>
                    (
                    <?= $product->getData("size") ? $product->getResource()->getAttribute('size')->getFrontend()->getValue($product)." " : '' ?>
                    <?= $product->getData("weigh") ? $product->getData("weigh")." " : '' ?>
                    )
                    <?php endif; ?>
                    </h3>
                    <?php if ($product->getData('color')) :?>
                    <h4>- <?= $product->getData('color') ?></h4>
                    <?php endif; ?>
                    <h4><?= $block->getPrice($product) ?></h4>
                    <h4>SKU : <?= $product->getSku() ?></h4>
                </div>
            </div>
            <div class="row block-content-message-box">
                <div class="col-md-12">
                    <form class="form form-login"
                            action="<?php /* @escapeNotVerified */ echo $block->getBaseUrl()."product_seller_info/product/sellercontactsubmit" ?>"
                            method="post" id="sellerconactform" data-mage-init='{"validation":{}}'>
                        <?php echo $block->getBlockHtml('formkey'); ?>
                        <fieldset class="fieldset login"
                                data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>">
                            <input type="hidden" name="param_id" value="<?= $block->getEncryptParam($product->getSku()) ?>" >
                                <!--<div class="field note"><? /* @escapeNotVerified */ echo __('If you have an account, sign in with your email address.') ?></div>-->
                                <div class="field required">
                                    <label class="label" for="message"><span><?php /* @escapeNotVerified */ echo __('Message') ?></span></label>
                                        <div class="control">
                                            <textarea name="message"
                                                        id="message"
                                                        class="input-text"
                                                        placeholder="<?php /* @escapeNotVerified */ echo __('Write Something...') ?>"
                                                        data-validate="{required:true}"></textarea>
                                        </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-9">
                                        <p>
                                            To keep everyone safe My Pricelow!, please don't send messages that include contact info. Repeated attemapts could lead to an account
                                            suspension or other penalties.
                                        </p>
                                    </div>
                                </div>
                                <div class="action">
                                    <button type="submit" class="action login primary" name="submit">
                                            <span><?php /* @escapeNotVerified */ echo __('Send Message') ?></span>
                                    </button>
                                    <button class="action login primary" name="back" style="background: #fb6c1c; margin-left: 10px;">
                                        <span><?php /* @escapeNotVerified */ echo __('Back') ?></span>
                                    </button>
                                </div>
                        </fieldset>
                    </form>
                </div>
            </div>
	</div>
</div>
<?php
}
?>

<!--<script type="text/x-magento-init">
    {
        "#raffle-front-form": {
            "validation": {}
        }
    }
</script>-->ProductSellerInfo/view/frontend/templates/sellerinfo.phtml0000644000000000000000000001734614364325176023204 0ustar  rootroot<?php

use Magento\Framework\App\Action\Action;

/**
 * Product list template
 *
 * @var $block WebbyTroops\ProductSellerInfo\Block\Product\ProductSellerInformation
 */
$_productCollection = $block->getProduct();
$warrantyPolicyAttr = $_productCollection->getAttributeText('warranty_policy');
$warrantyPolicy = "Contact Vender For Warranty Protection";
if ($_productCollection->getData('warranty_policy')) {
    $warrantyPolicy = $warrantyPolicyAttr;
}
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
$_wyomindHelper = $this->helper('WebbyTroops\ProductSellerInfo\Helper\EstimatedShipData');
$_estimatedShippingMessage = null;
$_estimatedShippingMessage = $_wyomindHelper->renderMessage($_productCollection, -1, 1);
$seller = $block->getLofSeller($_productCollection);
//echo "<pre>";
//print_r($block->getCustomerDisclaimerMessage());
//die;
?>
<style>
    .close-pop-model {
        background-color: #fb6c1c;
        color: #FFFFFF;
    }
    .modal-popup .modal-inner-wrap {
        width: 40%;
    }
</style>
<div class="product-sidebar delivery-info">        
    <div class="block block-product-seller-info">
        <div class="block-title">
            <strong><?= __("Delivery Information") ?></strong>
        </div>
        <div class="block-content">
            <div style="color: #222222;">
                <?php if ($_estimatedShippingMessage) { ?>
                    <div class="row">
                        <div class="col-md-2 policy-section-icon-col">
                            <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/shipped.png'); ?>" /></span>
                        </div>
                        <div class="col-md-10">
                            <span class="policy-section-label"><?= __("Delivery:") ?></span><span class="policy-section-content"> <?php echo $_estimatedShippingMessage; ?></span>
                        </div>
                    </div>
                <?php } ?>
                <?php if ($seller->getReturnPolicy()) { ?>
                    <div class="row">
                        <div class="col-md-2 policy-section-icon-col">
                            <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/rma.png'); ?>" /></span>
                        </div>
                        <div class="col-md-10">
                            <span class="policy-section-label"><?= __("Return Policy:") ?></span> <span class="policy-section-content"><?= $block->geReturnPolicyValue($seller->getReturnPolicy()) ?> </span>
                        </div>
                    </div>
                <?php } ?>
                <div class="row">
                    <div class="col-md-2 policy-section-icon-col">
                        <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/publicsafety.png'); ?>" /></span>
                    </div>
                    <div class="col-md-10">
                        <span class="policy-section-label"><?= __("Warranty:") ?></span> <span class="policy-section-content"><?= $warrantyPolicy ?> </span>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-2 policy-section-icon-col">
                        <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/disclaimer.png'); ?>" /></span>
                    </div>
                    <div class="col-md-10">
                        <span class="policy-section-label"><?= __("Disclaimer:") ?></span> <span class="show-disclaimer policy-section-content">Our objective is show you accurate information. 
                            <strong><a href="javascript:void(0)">See our disclaimer.</a></strong></span>

                    </div>
                </div>
            </div>
        </div>
    </div>  
</div>
<?php if ($block->getCustomerDisclaimerMessage()): ?>
    <!--model for showing customer disclaimer-->
    <div id="modal">
        <div class="modal-body-content">
    <!--        <h2><? $block->escapeHtml(__('Title')) ?></h2>-->
            <p><?= $block->getCustomerDisclaimerMessage() ?></p>
        </div>
    </div>

    <script type="text/javascript">
        require([
            "jquery",
            "Magento_Ui/js/modal/modal"
        ], function ($, modal) {

            var options = {
                type: 'popup',
                responsive: true,
                title: 'Customer Disclaimer Message',
                buttons: [{
                        text: $.mage.__('Ok'),
                        class: 'close-pop-model',
                        click: function () {
                            this.closeModal();
                        }
                    }]
            };

            var popup = modal(options, $('#modal'));
            $(".show-disclaimer").click(function () {
                $('#modal').modal('openModal');
            });
        });
    </script>
<?php endif; ?>

<?php if ($_productCollection->getSellerId() && $block->isEnableModule()): ?>
    <?php if ($seller->getId()) { ?>
        <div class="product-sidebar seller-info">        
            <div class="block block-product-seller-info">
                <div class="block-title">
                    <strong><?= __('SELLER INFORMATION') ?></strong>
                </div>
                <div class="block-content">
                    <div class="row">
                        <div class="col-md-12">
                            <p><span class="policy-section-label">Sold by:</span> <a href="<?= $block->getBaseUrl() . 'seller/' . $seller->getUrlKey() . '.html'; ?>" target="_blank"> <?= $seller->getName() ?> </a></p>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-2 policy-section-icon-col">
                            <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/conactseller.png'); ?>" /></span>
                        </div>
                        <div class="col-md-10">
                            <span class="policy-section-label"><a href="<?= $block->getBaseUrl() . 'product_seller_info/product/sellercontactform/' . $block->getParamId($_productCollection->getSku()); ?>">Contect Seller</a></span>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-2 policy-section-icon-col">
                            <span class="policy-section-icon"><img src="<?php echo $this->getViewFileUrl('WebbyTroops_ProductSellerInfo::images/sellerchat.png'); ?>" /></span>
                        </div>
                        <div class="col-md-10">
                            <span class="policy-section-label"><a href="javascript:void(0)" class="chat_with_seller">Chat With Seller</a></span>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <span class="policy-section-label"><a href="<?= $block->getBaseUrl() . 'seller/' . $seller->getUrlKey() . '.html'; ?>" target="_blank">Visit Seller Store</a></span>
                        </div>
                    </div>
                </div>
            </div>  
        </div>

        <script type="text/javascript">
            require([
                'jquery'
            ], function ($) {
                $('.chat_with_seller').click(function () {
                    $('.chat').slideToggle(300, 'swing');
                });
            });
        </script>
        <?php
    }
    ?>

<?php endif; ?>

ProductSellerInfo/view/frontend/layout/0000755000000000000000000000000014364325176017300 5ustar  rootrootProductSellerInfo/view/frontend/layout/catalog_product_view.xml0000644000000000000000000000170714364325176024233 0ustar  rootroot<?xml version="1.0"?>
<!--
/**
 * Copyright © 2018 Porto. All rights reserved.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="WebbyTroops_ProductSellerInfo::css/mycss.css" />
    </head>
    <body>
        <referenceContainer name="sidebar.main">
            <block class="WebbyTroops\ProductSellerInfo\Block\Product\ProductSellerInformation" name="category_view_seller_info_block" template="WebbyTroops_ProductSellerInfo::sellerinfo.phtml" before="product-sidebar" />
        </referenceContainer>
<!--        <referenceBlock name="editprofile">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">WebbyTroops_ProductSellerInfo::seller/marketplace/editprofile.phtml</argument>
            </action>
        </referenceBlock>-->
    </body>
</page>
ProductSellerInfo/view/frontend/layout/product_seller_info_product_sellercontactform.xml0000644000000000000000000000170014364325176031427 0ustar  rootroot<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="WebbyTroops_ProductSellerInfo::css/mycss.css" />
    </head> 
    <body>
        <referenceContainer name="page.messages">            
            <block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder" template="Magento_Theme::html/messages.phtml"/>
            <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml"/>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="WebbyTroops\ProductSellerInfo\Block\Product\Sellercontactform" name="product_seller_contact_form" template="WebbyTroops_ProductSellerInfo::sellercontactform.phtml" />
        </referenceContainer>
    </body>
</page>ProductSellerInfo/view/frontend/email/0000755000000000000000000000000014364325176017052 5ustar  rootrootProductSellerInfo/view/frontend/email/email_template_for_vendor.html0000644000000000000000000000625214364325176025152 0ustar  rootroot<!--@subject {{var subject|raw }}  @-->
<!--@vars {
"var this.getUrl($store, 'admin')":"Warehouse Account URL",
"var customer.email":"Customer Email",
"var customer.name":"Customer Name"
} @-->

{{template config_path="design/email/header_template"}} 

<table>
    <tr class="email-intro">
        <td>
            <!--<p class="greeting">{{trans "%customer_name," customer_name=$customerName}}</p>-->
            <p>
            <h1>
                {{trans 'The %customer_name has inquiry to ' customer_name=$customerName |raw}} 
                <span>{{trans 'Product %product_name for ' product_name=$productName |raw}} </span>
                <span>{{trans 'Seller %seller_name ' seller_name=$sellerName |raw}} </span>
            </h1>
                {{trans "Product inquiry for seller."}}
            </p>
        </td>
    </tr>
    <tr class="email-summary">
        <td>
            <!--<h1>{{trans 'Your Order <span class="no-link">#%increment_id</span>' increment_id=$orderid |raw}}</h1>-->
            <!--<p>{trans 'Placed on <span class="no-link">%created_at</span>' created_at=$myorderidvar2 |raw}}</p>-->
        </td>
    </tr>
    <tr class="email-information">
        <td>
            <table class="order-details">
                <tr>
                    <td class="address-details">
                        <h3 style="color: #333333">{{trans "Query Description Detail"}}</h3>
                        <!--<p>{{var queryDescription|raw}}</p>-->
                    </td>
                </tr>
            </table>
            <table class="email-items">
<!--                <thead>
                    <tr>
                        <th class="item-info">{{trans "Item"}}</th>
                        <th class="item-info">{{trans "Sku"}}</th>
                        <th class="item-info">{{trans "Seller"}}</th>
                        <th class="item-info">{{trans "Customer"}}</th>
                    </tr>
                </thead>-->
                <tbody>
                    <tr>
                        <td class="item-info">{{trans "Product : "}}</td>
                        <td class="item-info"><a href="{{var productUrl|raw}}"> {{var productName|raw}} </a></td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Sku : "}}</td>
                        <td class="item-info">{{var sku|raw}}</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Seller : "}}</td>
                        <td class="item-info">{{var sellerName|raw}} ({{var sellerEmail|raw}})</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Customer : "}}</td>
                        <td class="item-info">{{var customerName|raw}} ({{var customerEmail|raw}})</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Query Description : "}}</td>
                        <td class="item-info">{{var queryDescription|raw}}</td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</table>

{{template config_path="design/email/footer_template"}} <!--footer of template-->ProductSellerInfo/view/frontend/email/email_template_for_admin.html0000644000000000000000000000625214364325176024745 0ustar  rootroot<!--@subject {{var subject|raw }}  @-->
<!--@vars {
"var this.getUrl($store, 'admin')":"Warehouse Account URL",
"var customer.email":"Customer Email",
"var customer.name":"Customer Name"
} @-->

{{template config_path="design/email/header_template"}} 

<table>
    <tr class="email-intro">
        <td>
            <!--<p class="greeting">{{trans "%customer_name," customer_name=$customerName}}</p>-->
            <p>
            <h1>
                {{trans 'The %customer_name has inquiry to ' customer_name=$customerName |raw}} 
                <span>{{trans 'Product %product_name for ' product_name=$productName |raw}} </span>
                <span>{{trans 'Seller %seller_name ' seller_name=$sellerName |raw}} </span>
            </h1>
                {{trans "Product inquiry for seller."}}
            </p>
        </td>
    </tr>
    <tr class="email-summary">
        <td>
            <!--<h1>{{trans 'Your Order <span class="no-link">#%increment_id</span>' increment_id=$orderid |raw}}</h1>-->
            <!--<p>{trans 'Placed on <span class="no-link">%created_at</span>' created_at=$myorderidvar2 |raw}}</p>-->
        </td>
    </tr>
    <tr class="email-information">
        <td>
            <table class="order-details">
                <tr>
                    <td class="address-details">
                        <h3 style="color: #333333">{{trans "Query Description Detail"}}</h3>
                        <!--<p>{{var queryDescription|raw}}</p>-->
                    </td>
                </tr>
            </table>
            <table class="email-items">
<!--                <thead>
                    <tr>
                        <th class="item-info">{{trans "Item"}}</th>
                        <th class="item-info">{{trans "Sku"}}</th>
                        <th class="item-info">{{trans "Seller"}}</th>
                        <th class="item-info">{{trans "Customer"}}</th>
                    </tr>
                </thead>-->
                <tbody>
                    <tr>
                        <td class="item-info">{{trans "Product : "}}</td>
                        <td class="item-info"><a href="{{var productUrl|raw}}"> {{var productName|raw}} </a></td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Sku : "}}</td>
                        <td class="item-info">{{var sku|raw}}</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Seller : "}}</td>
                        <td class="item-info">{{var sellerName|raw}} ({{var sellerEmail|raw}})</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Customer : "}}</td>
                        <td class="item-info">{{var customerName|raw}} ({{var customerEmail|raw}})</td>
                    </tr>
                    <tr>
                        <td class="item-info">{{trans "Query Description : "}}</td>
                        <td class="item-info">{{var queryDescription|raw}}</td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</table>

{{template config_path="design/email/footer_template"}} <!--footer of template-->ProductSellerInfo/Setup/0000755000000000000000000000000014364325176014272 5ustar  rootrootProductSellerInfo/Setup/InstallData.php0000644000000000000000000000335114364325176017205 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
	private $eavSetupFactory;

	public function __construct(EavSetupFactory $eavSetupFactory)
	{
		$this->eavSetupFactory = $eavSetupFactory;
	}
	
	public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
	{
		$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
                $eavSetup->addAttribute(
                    \Magento\Catalog\Model\Product::ENTITY,
                    'warranty_policy',
                    [
                    'group' => 'General',
                    'type' => 'int',
                    'backend' => '',
                    'frontend' => '',
                    'label' => 'Warranty Policy',
                    'input' => 'select',
                    'class' => '',
                    'source' => 'WebbyTroops\ProductSellerInfo\Model\Config\Source\WarrantyPolicyOptions',
                    'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
                    'visible' => true,
                    'required' => true,
                    'user_defined' => false,
                    'default' => '',
                    'searchable' => false,
                    'filterable' => false,
                    'comparable' => false,
                    'visible_on_front' => false,
                    'used_in_product_listing' => true,
                    'unique' => false
                    ]
                    ); 
	}
}
ProductSellerInfo/Controller/0000755000000000000000000000000014364325176015315 5ustar  rootrootProductSellerInfo/Controller/Adminhtml/0000755000000000000000000000000014364325176017232 5ustar  rootrootProductSellerInfo/Controller/Adminhtml/Index/0000755000000000000000000000000014364325176020301 5ustar  rootrootProductSellerInfo/Controller/Adminhtml/Index/Index.php0000644000000000000000000000173714364325176022071 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use Magento\Framework\View\Result\PageFactory;

class Index extends Action
{
    private $resultPageFactory;

    /**
     * Authorization level of a basic admin session
     *
     * @see _isAllowed()
     */
    const ADMIN_RESOURCE = 'WebbyTroops_ProductSellerInfo::product_seller_info';

    public function __construct(
        Action\Context $context,
        PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     * @return bool
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);
    }

    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Product Enqury Information'));
        return $resultPage;
    }
}
ProductSellerInfo/Controller/Adminhtml/Index/View.php0000644000000000000000000000350314364325176021725 0ustar  rootroot<?php


namespace WebbyTroops\ProductSellerInfo\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use Magento\Framework\Registry;
use Magento\Framework\View\Result\PageFactory;
use WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory;
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;

class View extends Action implements HttpGetActionInterface
{

    private $resultPageFactory;

    protected $productSellerInfoFactory;

    protected $_coreRegistry;

    public function __construct(
        Action\Context $context,
        PageFactory $resultPageFactory,
        ProductSellerInfoFactory $productSellerInfoFactory,
        Registry $_coreRegistry
    ) {
        $this->resultPageFactory = $resultPageFactory;
        $this->productSellerInfoFactory = $productSellerInfoFactory;
        $this->_coreRegistry = $_coreRegistry;
        parent::__construct($context);
    }

    public function execute()
    {
        $productSellerInfoId = $this->getRequest()->getParam('id');
        $model = $this->productSellerInfoFactory->create();

        if ($productSellerInfoId) {
            $model->load($productSellerInfoId);
            if (!$model->getId()) {
                $this->messageManager->addErrorMessage(__('This Product Enqury Information no longer exists.'));
                $resultRedirect = $this->resultRedirectFactory->create();
                return $resultRedirect->setPath('*/*/');
            }
        }
        $this->_coreRegistry->register('product_seller_info', $model);
        
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(
            $model->getId() ? __('View Product Enqury Information %1', $model->getProductName()) : __('New Product Enqury Information')
        );
        return $resultPage;
    }
}
ProductSellerInfo/Controller/Adminhtml/Index/Delete.php0000644000000000000000000000323614364325176022220 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Controller\Adminhtml\Index;

use Magento\Backend\App\Action;
use WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory;
use Magento\Framework\Filesystem\Driver\File;
use Magento\Framework\Filesystem;
use Magento\Framework\App\Filesystem\DirectoryList;

class Delete extends Action
{
    protected $productSellerInfoFactory;

    protected $fileSystem;

    protected $file;

    public function __construct(
        Action\Context $context,
        ProductSellerInfoFactory $productSellerInfoFactory,
        File $file,
        Filesystem $fileSystem
    ) {
        $this->productSellerInfoFactory = $productSellerInfoFactory;
        $this->fileSystem = $fileSystem;
        $this->file = $file;
        parent::__construct($context);
    }

    /**
     * @inheritDoc
     */
    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        $sizeGuideId = $this->getRequest()->getParam('id');
        if ($sizeGuideId) {
            try {
                $model = $this->productSellerInfoFactory->create();
                $model->load($sizeGuideId);
                $model->delete();
                $this->messageManager->addSuccessMessage(__('You deleted the product enqury.'));
                return $resultRedirect->setPath('*/*/index');
            } catch (\Exception $e) {
                $this->messageManager->addErrorMessage($e->getMessage());
                return $resultRedirect->setPath('*/*/index');
            }
        }
        $this->messageManager->addErrorMessage(__('We can\'t find a product enqury.'));
        return $resultRedirect->setPath('*/*/index');
    }
}
ProductSellerInfo/Controller/Product/0000755000000000000000000000000014364325176016735 5ustar  rootrootProductSellerInfo/Controller/Product/Sellercontactform.php0000644000000000000000000000621414364325176023137 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Controller\Product;

use Magento\Framework\UrlInterface;
use \Magento\Framework\Controller\ResultFactory;

/**
 * @class Sellercontactform
 */
class Sellercontactform extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;
    
    /**
     * @var UrlInterface
     */
    private $urlInterface;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Data
     */
    protected $helper;
    
    /**
     * @var \Magento\Framework\App\RequestInterface $request
     */
    protected $request;
    
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;
    
    /**
     * @var \Magento\Framework\Message\ManagerInterface
     */
    protected $_messageManager;
    
    /**
     * Rafflefrontform constructor.
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     * @param UrlInterface $urlInterface
     * @param \WebbyTroops\ProductSellerInfo\Helper\Data $helper
     * @param \Magento\Framework\App\RequestInterface $request
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Framework\Message\ManagerInterface $messageManager
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        UrlInterface $urlInterface,
        \WebbyTroops\ProductSellerInfo\Helper\Data $helper,
        \Magento\Framework\App\RequestInterface $request,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\Message\ManagerInterface $messageManager
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
        $this->urlInterface = $urlInterface;
        $this->helper = $helper;
        $this->customerSession = $customerSession;
        $this->request = $request;
        $this->_messageManager = $messageManager;
    }
    
    /**
     * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
     */
    public function execute()
    {
        $params = $this->request->getParams();
        if ($this->helper->customerIsLoggedIn()) {
            if (count($params)) {
                $product = $this->helper->checkProduct($params);
                if ($product) {
                    $resultPage = $this->resultPageFactory->create();
                    $resultPage->getConfig()->getTitle()->prepend(__('Contect Seller'));
                    
                    return $resultPage;
                }
            }
            $this->_messageManager->addErrorMessage('Something went wrong.');

            $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
            $resultRedirect->setUrl($this->_redirect->getRefererUrl());

            return $resultRedirect;
        } else {
            $this->customerSession->setAfterAuthUrl($this->urlInterface->getCurrentUrl());
            $this->customerSession->authenticate();
        }
    }
}
ProductSellerInfo/Controller/Product/Sellercontactsubmit.php0000644000000000000000000002121114364325176023471 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Controller\Product;

use Magento\Framework\UrlInterface;
use \Magento\Framework\Controller\ResultFactory;

/**
 * @class Sellercontactsubmit
 */
class Sellercontactsubmit extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;
    
    /**
     * @var UrlInterface
     */
    private $urlInterface;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Data
     */
    protected $helper;
    
    /**
     * @var \Magento\Framework\App\RequestInterface $request
     */
    protected $request;
    
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;
    
    /**
     * @var \Magento\Framework\Message\ManagerInterface
     */
    protected $_messageManager;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory
     */
    protected $productSellerInfoFactory;
    
    /**
     * @var \WebbyTroops\ProductSellerInfo\Helper\Email
     */
    protected $emailHelper;
    
    /**
     * Sellercontactsubmit constructor.
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     * @param UrlInterface $urlInterface
     * @param \WebbyTroops\ProductSellerInfo\Helper\Data $helper
     * @param \Magento\Framework\App\RequestInterface $request
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Framework\Message\ManagerInterface $messageManager
     * @param \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory $productSellerInfoFactory
     * @param \WebbyTroops\ProductSellerInfo\Helper\Email $emailHelper
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        UrlInterface $urlInterface,
        \WebbyTroops\ProductSellerInfo\Helper\Data $helper,
        \Magento\Framework\App\RequestInterface $request,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory $productSellerInfoFactory,
        \WebbyTroops\ProductSellerInfo\Helper\Email $emailHelper
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
        $this->urlInterface = $urlInterface;
        $this->helper = $helper;
        $this->customerSession = $customerSession;
        $this->request = $request;
        $this->_messageManager = $messageManager;
        $this->productSellerInfoFactory = $productSellerInfoFactory;
        $this->emailHelper = $emailHelper;
    }
    
    /**
     * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
     */
    public function execute()
    {
        $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
        if ($this->helper->customerIsLoggedIn()) {
            $params = $this->request->getParams();
            if (isset($params['param_id']) && $this->helper->checkProductString($params['param_id']) && isset($params['message'])) {
                $product = $this->helper->getProductCollection($params['param_id']);
                if ($product) {
                    $data = [];
                    $seller = $this->helper->getLofSeller($product->getSellerId());
                    $customer = $this->helper->getCustomer();
                    if ($seller && $customer->getId()) {
                        $data ['product_id'] = $product->getId();
                        $data ['product_name'] = $product->getName();
                        $data ['sku'] = $product->getSku();
                        $data ['price'] = $product->getPrice();
                        $data ['query_description'] = $params["message"];
                        $data ['seller_id'] = $product->getSellerId();
                        $data ['seller_name'] = $seller->getName();
                        $data ['seller_email'] = $seller->getEmail();    
                        $data ['customer_id'] = $customer->getId();
                        $data ['customer_name'] = $customer->getName();
                        $data ['customer_email'] = $customer->getEmail();
                        
                        $model = $this->productSellerInfoFactory->create();
                        try {
                                $model->setData($data);
                                $model->save();
                                
                                /* Here we prepare data for our email  */
                                    /* Receiver Detail  */
                                    $receiverInfoAdmin = [
                                        'name' => $this->emailHelper->getConfigAdminNameForEmail(),
                                        'email' => $this->emailHelper->getConfigAdminEmail()
                                    ];
                                    $receiverInfoVendor = [
                                        'name' => $data ['seller_name'],
                                        'email' => $data ['seller_email']
                                    ];
                                    /* Sender Detail  */
                                    $senderInfo = [
                                        'name' => $this->emailHelper->getConfigSallerName(),
                                        'email' => $this->emailHelper->getConfigSallerEmail(),
                                    ];


                                    /* Assign values for your template variables  */
                                    $emailTemplateVariables = [];
                                    $emailTempVariables['productId'] = $data ['product_id'];
                                    $emailTempVariables['productName'] = $data ['product_name'];
                                    $emailTempVariables['productUrl'] = $product->getProductUrl();
                                    $emailTempVariables['sku'] = $data ['sku'];
                                    $emailTempVariables['price'] = $data ['price'];
                                    $emailTempVariables['queryDescription'] = $data ['query_description'];
                                    $emailTempVariables['sellerName'] = $data ['seller_name'];
                                    $emailTempVariables['sellerEmail'] = $data ['seller_email'];
                                    $emailTempVariables['customerName'] = $data ['customer_name'];
                                    $emailTempVariables['customerEmail'] = $data ['customer_email'];
                                    $emailTempVariables['subject'] = "Customer query description for seller";

                                    /* call send mail method from helper or where you define it*/  
                                    $this->emailHelper->sendMailUpdate(
                                        $emailTempVariables,
                                        $senderInfo,
                                        $receiverInfoAdmin,
                                        'admin'
                                    );
                                    $this->emailHelper->sendMailUpdate(
                                        $emailTempVariables,
                                        $senderInfo,
                                        $receiverInfoVendor,
                                        'vender'
                                    );
                                /* End we prepare data for our email  */

                            $this->messageManager->addSuccessMessage(__('The Seller enquiry message has been sent.'));
                            //Result redirected to index controller
                            return $resultRedirect->setPath($product->getProductUrl());
                        } catch (LocalizedException $e) {
                            $this->messageManager->addErrorMessage($e->getMessage());
                        } catch (\Exception $e) {
                            $this->messageManager->addExceptionMessage(
                                $e,
                                $e->getMessage()
                            );
                        }
                    }
                }
            }
            $this->_messageManager->addErrorMessage('Something went wrong.');

            $resultRedirect->setUrl($this->_redirect->getRefererUrl());

            return $resultRedirect;
        } else {
            $this->customerSession->setAfterAuthUrl($this->urlInterface->getCurrentUrl());
            $this->customerSession->authenticate();
        }
    }
}
ProductSellerInfo/Helper/0000755000000000000000000000000014364325176014411 5ustar  rootrootProductSellerInfo/Helper/EstimatedShipData.php0000644000000000000000000002516214364325176020465 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Helper;

use Magento\Framework\Encryption\EncryptorInterface;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\App\Helper\Context;
use Wyomind\EstimatedDeliveryDate\Model\AttributeFactory;
use Magento\Catalog\Model\Product\Option\ValueFactory;
use Magento\Checkout\Model\CartFactory;
use Magento\Backend\Model\Session\QuoteFactory;
use Magento\Checkout\Model\SessionFactory;
use Magento\Catalog\Model\CategoryFactory;
use Wyomind\EstimatedDeliveryDate\Block\Adminhtml\System\Config\Form\Field\ShippingMethodsFactory;

class EstimatedShipData extends \Wyomind\EstimatedDeliveryDate\Helper\Data
{
    public function __construct(
        \Wyomind\EstimatedDeliveryDate\Helper\Delegate $wyomind, Context $context, AttributeFactory $eddModelAttributeFactory, ValueFactory $optionValueFactory, CartFactory $checkoutCartFactory, QuoteFactory $backendModeldQuoteFactory, SessionFactory $sessionQuoteFactory, ShippingMethodsFactory $shippingMethodsFactory,CategoryFactory $categoryFactory)
    {
        parent::__construct($wyomind, $context, $eddModelAttributeFactory, $optionValueFactory, $checkoutCartFactory, $backendModeldQuoteFactory, $sessionQuoteFactory, $shippingMethodsFactory,$categoryFactory);
    }

    /**
     * @param null $product
     * @param int $currentTime
     * @param int $storeId
     * @param string $context
     * @param int $additionalFrom
     * @param int $additionalTo
     * @param int $qty
     * @param bool $shippingMethod
     * @param bool $inOrderContext
     * @return null|string
     * @throws \Exception
     */
    public function renderMessage($product = null, $currentTime = -1, $storeId = 0, $context = "product", $additionalFrom = 0, $additionalTo = 0, $qty = 1, $shippingMethod = false, $inOrderContext = false)
    {
        try {
            if ($this->framework->getStoreConfig("estimateddeliverydate/common/enabled", $storeId)) {
                $html = null;
                $label = null;
                $isPreview = $context == "preview";
                if (!$product) {
                    return;
                }
                $stockStatus = $this->getStockStatus($product, $storeId, $qty);
                $partsToGenerate = [];
                if ($isPreview || $context == "cart") {
                    $partsToGenerate[] = "cart";
                }
                if ($isPreview || $context == "cart_item" || $context == "osc_item") {
                    $useMessageForeachCartItem = $this->getProductSettings($product, "use_message_foreach_cart_item", $stockStatus, $storeId);
                    $messageForeachCartItem = $this->getProductSettings($product, "message_foreach_cart_item", $stockStatus, $storeId);
                    if (!($context == "cart_item" && !$useMessageForeachCartItem)) {
                        $partsToGenerate[] = "cart_item";
                    }
                }
                if ($isPreview || $context == "email") {
                    $partsToGenerate[] = "email";
                }
                if ($isPreview || $context == "category") {
                    $useMessageForCategory = $this->getProductSettings($product, "use_message_for_category", $stockStatus, $storeId);
                    if ($useMessageForCategory) {
                        $partsToGenerate[] = "category";
                    }
                }
                if (($isPreview || $context == "product" || $context == null)) {
                    $useMessageForProduct = $this->getProductSettings($product, "use_message_for_product", $stockStatus, $storeId);
//                    if ($useMessageForProduct) {
                    $partsToGenerate[] = "product";
//                    }
                }
                $leadTimes = false;
                if (!empty($partsToGenerate)) {
                    $leadTimes = $this->getLeadTimes($product, $currentTime, $storeId, $additionalFrom, $additionalTo, $qty, true, $shippingMethod, $inOrderContext);
                }
                if ($leadTimes == false) {
                    $html .= $this->renderTrace();
                    return $html;
                }
                if (in_array("cart", $partsToGenerate)) {
                    $html .= $this->renderCartMessage($leadTimes, $storeId, $context);
                }
                if (in_array("cart_item", $partsToGenerate)) {
                    $useMessageForeachCartItem = $this->getProductSettings($product, "use_message_foreach_cart_item", $stockStatus, $storeId);
                    $messageForeachCartItem = $this->getProductSettings($product, "message_foreach_cart_item", $stockStatus, $storeId);
                    $this->addTrace("Use message foreach cart item  ", $useMessageForeachCartItem);
                    $this->addTrace("Message foreach cart item  ", $messageForeachCartItem);
                    $parseMessageForCartItem = $this->parseMessage($messageForeachCartItem, $leadTimes);
                    $this->addTrace("Parsed Message", $parseMessageForCartItem, "success");
                    if ($isPreview) {
                        $label = " <label>" . __("Message for items in cart") . "</label>";
                    }
                    $html .= "<div class='estimatedDeliveryDate message success'><div>" . $label . $parseMessageForCartItem . "</div></div>";
                }
                if (in_array("email", $partsToGenerate)) {
                    $messageForeachEmail = $this->getProductSettings($product, "message_foreach_email", $stockStatus, $storeId);
                    $this->addTrace("Message foreach email item  ", $messageForeachEmail);
                    $messageForeachCartItem = $this->getProductSettings($product, "message_foreach_cart_item", $stockStatus, $storeId);
                    $parseMessageForEmail = $this->parseMessage($messageForeachCartItem, $leadTimes);
                    $this->addTrace("Parsed Message", $parseMessageForEmail, "success");
                    if ($isPreview) {
                        $label = " <label>" . __("Message for items in email") . "</label>";
                    }
                    $html .= "<div class='estimatedDeliveryDate message success'><div>" . $label . $parseMessageForEmail . "</div></div>";
                }
                if (in_array("category", $partsToGenerate)) {
                    $this->addTrace("Use message in category page  ", $useMessageForCategory);
                    $messageForCategory = $this->getProductSettings($product, "message_for_category", $stockStatus, $storeId);
                    $this->addTrace("Message in category page  ", $messageForCategory);
                    $parseMessageForCategory = $this->parseMessage($messageForCategory, $leadTimes);
                    $this->addTrace("Parsed Message", $parseMessageForCategory, "success");
                    if ($isPreview) {
                        $label = " <label>" . __("Message in category page") . "</label>";
                    }
                    $html .= "<div class='estimatedDeliveryDate message success' id='estimated-delivery-date-" . $product->getId() . "'><div>" . $label . $parseMessageForCategory . "</div></div>";
                }
                if (in_array("product", $partsToGenerate)) {
                    $this->countdownFormat = $this->framework->getStoreConfig("estimateddeliverydate/countdown/format", $storeId);
                    $this->addTrace("Countdown format", $this->countdownFormat);
                    $this->countdownType = $this->framework->getStoreConfig("estimateddeliverydate/countdown/type", $storeId);
                    $this->addTrace("Countdown type", $this->countdownFormat);
                    $this->countdownRealTime = $this->framework->getStoreConfig("estimateddeliverydate/countdown/realtime", $storeId);
                    $this->addTrace("Countdown in real time", $this->countdownRealTime);
                    $this->addTrace("Use message in product page  ", $useMessageForProduct);
                    $messageForProduct = $this->getProductSettings($product, "message_for_product_sidebar", $stockStatus, $storeId);
                    $writer = new \Zend_Log_Writer_Stream(BP . '/var/log/bings.log');
                    $logger = new \Zend_Log();
                    $logger->addWriter($writer);
                    $logger->info(print_r($messageForProduct, true));
                    $this->addTrace("Message in product page  ", $messageForProduct);
                    $parseMessageForProduct = $this->parseMessage($messageForProduct, $leadTimes, false);
                    $logger->info(print_r($parseMessageForProduct, true));
                    $logger->info(print_r($leadTimes, true));
                    $this->addTrace("Parsed Message", $parseMessageForProduct, "success");
                    if ($isPreview) {
                        $label = " <label>" . __("Message in product page") . "</label>";
                        $html .= "<div class='estimatedDeliveryDate message notice'>" . $label . $parseMessageForProduct . "</div>";
                    } else {
                        $html .= "" . $label . $parseMessageForProduct . "";
                    }
                }
                if ($isPreview) {
                    $jsonShipping = $this->jsonDecoder->decode($this->framework->getStoreConfig("estimateddeliverydate/shipping/json", $storeId));
                    $shippingMethods = $this->shippingMethodsFactory->create()->getShippingMethods();
                    foreach ($jsonShipping as $rule) {
                        $shippingName = "";
                        foreach ($shippingMethods as $shippingMethod) {
                            if (preg_match("#^" . $rule['code'] . "\$#", $shippingMethod['value'])) {
                                $shippingName = $shippingMethod['label'];
                                break;
                            }
                        }
                        $label = " <label>" . __("Message for shipping method: " . $shippingName) . "</label>";
                        $leadTimes = $this->getLeadTimes($product, $currentTime, $storeId, $additionalFrom, $additionalTo, $qty, true, $rule['code'], true);
                        $message = $this->renderCartMessage($leadTimes, $storeId, "cart", $rule["message"]);
                        $message = str_replace('{{title}}', $shippingName, $message);
                        $html .= "<div class='estimatedDeliveryDate message notice'>" . $label . strip_tags($message) . "</div>";
                    }
                }
                $html .= $this->renderTrace();
                return $html;
            }
        } catch (\Exception $e) {
            //if ($context == "preview") {
            if (true) {
                throw new \Exception($e->getMessage());
            }
        }
    }
}
ProductSellerInfo/Helper/Data.php0000644000000000000000000001456314364325176016004 0ustar  rootroot<?php

namespace WebbyTroops\ProductSellerInfo\Helper;

use Magento\Framework\Encryption\EncryptorInterface;
use Magento\Framework\App\ResourceConnection;

class Data extends \Magento\Framework\App\Helper\AbstractHelper 
{
    
    /**
     * @var EncryptorInterface
     */
    protected $encryptor;
    
    /**
     * @var \Magento\Catalog\Api\ProductRepositoryInterface
     */
    protected $productRepository;

    /**
     * @var \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory
     */
    protected $productSellerInfoFactory;
    
    /**
     * 
     * @var ResourceConnection
     */
    protected $connection;
    
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;
    
    /**
     * @var \Lof\MarketPlace\Model\SellerFactory
     */
    protected $sellerFactory;
    
    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $emailHelper;
    
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \WebbyTroops\ProductSellerInfo\Model\ProductSellerInfoFactory $productSellerInfoFactory,
        EncryptorInterface $encryptor,
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        ResourceConnection $connection,
        \Magento\Customer\Model\Session $customerSession,
        \Lof\MarketPlace\Model\SellerFactory $sellerFactory,
        Email $emailHelper
    ) {
        $this->productSellerInfoFactory = $productSellerInfoFactory->create();
        $this->encryptor = $encryptor;
        $this->productRepository = $productRepository;
        $this->connection = $connection;
        $this->customerSession = $customerSession;
        $this->sellerFactory = $sellerFactory;
        $this->emailHelper = $emailHelper;
    }
    
    /**
     * Check Is Enable module
     *
     * @return bool
     */
    public function isEnableModule()
    {
        return $this->emailHelper->isEnableModule();
    }
    
    /**
     * Check Customer Is LoggedIn
     *
     * @return bool
     */
    public function customerIsLoggedIn()
    {
        return $this->customerSession->isLoggedIn();
    }
    
    /**
     * Get Customer 
     *
     * @return obj
     */
    public function getCustomer()
    {
        return $this->customerSession->getCustomer();
    }

    /**
     * get sku is existing
     *
     * @param string $params
     * @return string
     */
    public function getSku($params) {
        /* get encryptor param sku */
        foreach ($params as $key => $param) {
            $paramSku = $key;
            if ($param) {
                $paramSku .= '/'.$param;
            }
        }
        if (isset($paramSku) && $paramSku) {
            $paramSku = str_replace(" ", "+", $paramSku);
            $sku = $this->encryptor->decrypt($paramSku);
        }
        return isset($sku) ? $sku : '';
    }
    
    /**
     * get sku is existing
     *
     * @param string $params
     * @return string
     */
    public function getSkuString($params) {
        /* get encryptor param sku */
        $sku = $this->encryptor->decrypt($params);
        
        return $sku ? $sku : '';
    }
    
    /**
     * get product id with sku
     *
     * @param string $sku
     * @return string
     */
    public function getProductId($sku) {
        /* Get product id from catalog_product_entity table with search keyword sku*/
        $conn = $this->connection->getConnection();
        $productTable = $this->connection->getTableName('catalog_product_entity');
        $selectProduct = $conn->select()->from(
                ["pro" => $productTable],
                ['entity_id', 'sku']
            )->where('pro.sku = ?', $sku);

        return $conn->fetchOne($selectProduct);
        
    }
    
    /**
     * Check Product
     *
     * @param string $params
     * @return bool
     */
    public function checkProduct($params) {
        $sku = $this->getSku($params);
        if ($sku) {
            $productId = $this->getProductId($sku);
        }
        
        return (isset($productId) && $productId) ? true : false;
    }
    
    /**
     * Check Product
     *
     * @param string $params
     * @return bool
     */
    public function checkProductString($params) {
        $sku = $this->getSkuString($params);
        if ($sku) {
            $productId = $this->getProductId($sku);
        }
        
        return (isset($productId) && $productId) ? true : false;
    }
    
    /**
     * Get Product Data
     *
     * @param string $params
     * @return obj
     */
    public function getProductData($params) {
        $sku = $this->getSku($params);
        if ($sku) {
            $productId = $this->getProductId($sku);
            if ($productId) {
                $product = $this->productRepository->getById($productId);
            }
        }
        
        return isset($product) ? $product : '';
    }
    
    /**
     * Get Product Data
     *
     * @param string $params
     * @return obj
     */
    public function getProductCollection($params) {
        $sku = $this->getSkuString($params);
        if ($sku) {
            $productId = $this->getProductId($sku);
            if ($productId) {
                $product = $this->productRepository->getById($productId);
            }
        }
        
        return isset($product) ? $product : '';
    }
    
    /**
     * Get encrypt string
     *
     * @param string $param
     * @return string
     */
    public function getEncryptParam($param) {
        return $this->encryptor->encrypt($param);
    }
    
    /**
     * Get seller data
     * @param int $id
     * @return obj
     */
    public function getLofSeller($sellerId)
    {
        if ($sellerId) {
            $seller = $this->sellerFactory->create()->load($sellerId, 'seller_id');
        }
        return isset($seller) ? $seller : '';
    }
    
    public function getReturnPolicyOption()
    {
        return [
            null => 'Please Select',
            'thirty_day_buyer' => '30 days after the item is delivered. Buyer pays for return shipping.',
            'sixty_day_buyer' => '60 days after the item is delivered. Buyer pays for return shipping.',
            'ninty_day_buyer' => '90 days after the item is delivered. Buyer pays for return shipping.',
            'thirty_day_seller' => '30 days after the item is delivered. Seller pays for return shipping.',
            'no_returns' => 'No Returns Accepted.',
        ];
    }

}
ProductSellerInfo/Helper/Email.php0000644000000000000000000001436014364325176016155 0ustar  rootroot<?php
namespace WebbyTroops\ProductSellerInfo\Helper;

/**
 * Custom Module Email helper
 */
class Email extends \Magento\Framework\App\Helper\AbstractHelper
{
    const XML_PATH_CUSTOMER_DISCLAIMER_MESSAGE  = 'customer_disclaimer/general/customer_disclaimer_msg';
    const XML_PATH_SELLER_MODULE_STATUS  = 'sellerinfo/general/status';
    const XML_PATH_ADMIN_NAME_FOR_EMAIL = 'sellerinfo/general/admin_name_add';
    const XML_PATH_ADMIN_EMAIL = 'sellerinfo/general/admin_email_add';
    const XML_PATH_EMAIL_TEMPLATE_FOR_ADMIN  = 'sellerinfo/general/admin_email_temp';
    const XML_PATH_EMAIL_TEMPLATE_FOR_VENDOR  = 'sellerinfo/general/vendor_email_temp';
    const XML_PATH_SELLER_EMAIL  = 'trans_email/ident_sales/email';
    const XML_PATH_SELLER_NAME  = 'trans_email/ident_sales/name';

    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $_scopeConfig;

    /**
     * Store manager
     *
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * @var \Magento\Framework\Translate\Inline\StateInterface
     */
    protected $inlineTranslation;

    /**
     * @var \Magento\Framework\Mail\Template\TransportBuilder
     */
    protected $_transportBuilder;
    
    /**
     * @var string
    */
    protected $temp_id;

    /**
    * @param Magento\Framework\App\Helper\Context $context
    * @param Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    * @param Magento\Store\Model\StoreManagerInterface $storeManager
    * @param Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
    * @param Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
    */
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
        \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
    ) {
        $this->_scopeConfig = $context;
        parent::__construct($context);
        $this->_storeManager = $storeManager;
        $this->inlineTranslation = $inlineTranslation;
        $this->_transportBuilder = $transportBuilder; 
    }
    
    /**
     * Check Is Enable module
     *
     * @return bool
     */
    public function isEnableModule()
    {
        return $this->getConfigValue(self::XML_PATH_SELLER_MODULE_STATUS, $this->getStore()->getStoreId());
    }

    /**
     * Return store configuration value of your template field that which id you set for template
     *
     * @param string $path
     * @param int $storeId
     * @return mixed
     */
    protected function getConfigValue($path, $storeId)
    {
        return $this->scopeConfig->getValue(
            $path,
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
    

    /**
     * Return store 
     *
     * @return Store
     */
    public function getStore()
    {
        return $this->_storeManager->getStore();
    }

    /**
     * Return template id according to store
     *
     * @return mixed
     */
    public function getTemplateId($xmlPath)
    {
        return $this->getConfigValue($xmlPath, $this->getStore()->getStoreId());
    }
    
    /**
     * Return seller email according to store
     *
     * @return mixed
     */
    public function getConfigSallerEmail()
    {
        return $this->getConfigValue(self::XML_PATH_SELLER_EMAIL, $this->getStore()->getStoreId());
    }
    
    /**
     * Return admin name according to store
     *
     * @return mixed
     */
    public function getConfigAdminNameForEmail()
    {
        return $this->getConfigValue(self::XML_PATH_ADMIN_NAME_FOR_EMAIL, $this->getStore()->getStoreId());
    }
    
    /**
     * Return admin email according to store
     *
     * @return mixed
     */
    public function getConfigAdminEmail()
    {
        return $this->getConfigValue(self::XML_PATH_ADMIN_EMAIL, $this->getStore()->getStoreId());
    }
    
    /**
     * Return seller name according to store
     *
     * @return mixed
     */
    public function getConfigSallerName()
    {
        return $this->getConfigValue(self::XML_PATH_SELLER_NAME, $this->getStore()->getStoreId());
    }
    
    /**
     * Return seller name according to store
     *
     * @return mixed
     */
    public function getCustomerDisclaimerMessage()
    {
        return $this->getConfigValue(self::XML_PATH_CUSTOMER_DISCLAIMER_MESSAGE, $this->getStore()->getStoreId());
    }

    /**
     * [generateTemplate description]  with template file and tempaltes variables values                
     * @param  Mixed $emailTemplateVariables 
     * @param  Mixed $senderInfo             
     * @param  Mixed $receiverInfo           
     * @return void
     */
    public function generateTemplate($emailTemplateVariables,$senderInfo,$receiverInfo)
    {
        $template =  $this->_transportBuilder->setTemplateIdentifier($this->temp_id)
                ->setTemplateOptions(
                    [
                        'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 
                        'store' => $this->_storeManager->getStore()->getId(),
                    ]
                )
                ->setTemplateVars($emailTemplateVariables)
                ->setFrom($senderInfo)
                ->addTo($receiverInfo['email'],$receiverInfo['name']);
        return $this;        
    }

    /**
     * [sendInvoicedOrderEmail description]                  
     * @param  Mixed $emailTemplateVariables 
     * @param  Mixed $senderInfo             
     * @param  Mixed $receiverInfo           
     * @return void
     */
    public function sendMailUpdate($emailTemplateVariables,$senderInfo,$receiverInfo,$type)
    {
        if ($type == 'admin') {
            $this->temp_id = $this->getTemplateId(self::XML_PATH_EMAIL_TEMPLATE_FOR_ADMIN);
        } else {
            $this->temp_id = $this->getTemplateId(self::XML_PATH_EMAIL_TEMPLATE_FOR_VENDOR);
        }
        $this->inlineTranslation->suspend();    
        $this->generateTemplate($emailTemplateVariables,$senderInfo,$receiverInfo);    
        $transport = $this->_transportBuilder->getTransport();
        $transport->sendMessage();        
        $this->inlineTranslation->resume();
    }
}