diff --git a/.gitignore b/.gitignore
index bc05ff310..42eced022 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ yarn-error.log
/ignorables/*
composer.lock
package-lock.json
+yarn.lock
diff --git a/composer.json b/composer.json
index 8c75fbb5f..815822b84 100755
--- a/composer.json
+++ b/composer.json
@@ -10,6 +10,7 @@
"require": {
"php": "^7.1.3",
"ext-curl": "*",
+ "ext-intl": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-pdo": "*",
diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php
index 6fbb11dd8..8de3b2f50 100755
--- a/packages/Webkul/Admin/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php
@@ -187,7 +187,6 @@ return [
],
'reset-password' => [
- 'title' => 'Reset Password',
'title' => 'Reset Password',
'email' => 'Registered Email',
'password' => 'Password',
@@ -983,7 +982,6 @@ return [
'customer' => 'Customer',
'settings' => 'Settings',
'address' => 'Address',
- 'address' => 'Address',
'street-lines' => 'Lines in a Street Address',
'sales' => 'Sales',
'shipping-methods' => 'Shipping Methods',
diff --git a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
index d26d66dcb..9d3ef4265 100755
--- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
@@ -1,5 +1,4 @@
[
'no-result-found' => 'Não conseguimos encontrar nenhum registro.',
@@ -8,7 +7,6 @@ return [
'true' => 'Verdadeiro',
'false' => 'Falso'
],
-
'layouts' => [
'my-account' => 'Minha Conta',
'logout' => 'Sair',
@@ -39,9 +37,10 @@ return [
'sliders' => 'Sliders',
'taxes' => 'Impostos',
'tax-categories' => 'Categorias de Impostos',
- 'tax-rates' => 'Impostos de Impostos'
+ 'tax-rates' => 'Impostos de Impostos',
+ 'promotion' => 'Promoções',
+ 'discount' => 'Desconto'
],
-
'acl' => [
'dashboard' => 'Dashboard',
'sales' => 'Vendas',
@@ -73,8 +72,9 @@ return [
'edit' => 'Edit',
'create' => 'Add',
'delete' => 'Delete',
+ 'promotions' => 'Promoções',
+ 'cart-rules' => 'Regras do Carrinho'
],
-
'dashboard' => [
'title' => 'Dashboard',
'from' => 'De',
@@ -96,7 +96,6 @@ return [
'stock-threshold' => 'Limite de Estoque',
'qty-left' => ':qty Restante',
],
-
'datagrid' => [
'mass-ops' => [
'method-error' => 'Erro! Método errado detectado, por favor, verifique a configuração de ação em massa',
@@ -104,7 +103,6 @@ return [
'partial-action' => 'Algumas ações não foram executadas devido a restrições restritas do sistema em :resource',
'update-success' => 'O índice selecionado :resource foram atualizados com sucesso',
],
-
'id' => 'ID',
'status' => 'Status',
'code' => 'Código',
@@ -151,8 +149,13 @@ return [
'role' => 'Função',
'sub-total' => 'Sub Total',
'no-of-products' => 'Número de Produtos',
+ 'attribute-family' => 'Família de Atributos',
+ 'starts-from' => 'Começa de',
+ 'ends-till' => 'Termina Até',
+ 'per-cust' => 'Por cliente',
+ 'usage-throttle' => 'Tempos de uso',
+ 'for-guest' => 'Para convidados'
],
-
'account' => [
'title' => 'Minha Conta',
'save-btn-title' => 'Salvar',
@@ -164,7 +167,6 @@ return [
'change-password' => 'Mudar Senha da Conta',
'current-password' => 'Senha Atual'
],
-
'users' => [
'forget-password' => [
'title' => 'Esqueci Minha Senha',
@@ -175,7 +177,6 @@ return [
'back-link-title' => 'Voltar para Login',
'submit-btn-title' => 'Link do E-mail para Recuperar Senha'
],
-
'reset-password' => [
'title' => 'Resetar Senha',
'email' => 'E-mail Registrado',
@@ -184,7 +185,6 @@ return [
'back-link-title' => 'Voltar para Login',
'submit-btn-title' => 'Resetar Senha'
],
-
'roles' => [
'title' => 'Funções',
'add-role-title' => 'Add Função',
@@ -198,7 +198,6 @@ return [
'custom' => 'Personalizado',
'all' => 'Tudo'
],
-
'users' => [
'title' => 'Usuário',
'add-user-title' => 'Add Usuário',
@@ -219,8 +218,11 @@ return [
'delete-last' => 'Ao menos um admin é obrigatório.',
'delete-success' => 'Sucesso! Usuário Deletado',
'incorrect-password' => 'A Senha informada é incorreta!',
+ 'password-match' => 'A senha atual não corresponde.',
+ 'account-save' => 'Alterações na conta salvas com sucesso.',
+ 'login-error' => 'Por favor, verifique suas credenciais e tente novamente.',
+ 'activate-warning' => 'Sua conta ainda está para ser ativada, entre em contato com o administrador.'
],
-
'sessions' => [
'title' => 'Entrar',
'email' => 'Email',
@@ -230,7 +232,6 @@ return [
'submit-btn-title' => 'Entrar'
]
],
-
'sales' => [
'orders' => [
'title' => 'Pedidos',
@@ -285,7 +286,6 @@ return [
'total-due' => 'Total Devido',
'cancel-confirm-msg' => 'Tem certeza que deseja cancelar esse pedido ?'
],
-
'invoices' => [
'title' => 'Faturas',
'id' => 'Id',
@@ -305,9 +305,10 @@ return [
'bill-to' => 'Cobrar de',
'ship-to' => 'Enviar para',
'print' => 'Imprimir',
- 'order-date' => 'Data do Pedido'
+ 'order-date' => 'Data do Pedido',
+ 'creation-error' => 'A criação de fatura de pedido não é permitida.',
+ 'product-error' => 'A fatura não pode ser criada sem produtos.'
],
-
'shipments' => [
'title' => 'Entregas',
'id' => 'Id',
@@ -328,10 +329,12 @@ return [
'inventory-source' => 'Fonte do Estoque',
'carrier-title' => 'Título da Transportadora',
'tracking-number' => 'Código de Rastreio',
- 'view-title' => 'Entrega #:shipment_id'
+ 'view-title' => 'Entrega #:shipment_id',
+ 'creation-error' => 'A expedição não pode ser criada para este pedido.',
+ 'order-error' => 'A criação de remessa de pedidos não é permitida.',
+ 'quantity-invalid' => 'A quantidade solicitada é inválida ou não está disponível.'
]
],
-
'catalog' => [
'products' => [
'title' => 'Produtos',
@@ -362,9 +365,20 @@ return [
'variant-already-exist-message' => 'Variante com as mesmas opções de atributo já existe.',
'add-image-btn-title' => 'Add Imagem',
'mass-delete-success' => 'Todos os índices de produtos selecionados foram excluídos com sucesso',
- 'mass-update-success' => 'Todo o índice selecionado de produtos foi atualizado com sucesso'
+ 'mass-update-success' => 'Todo o índice selecionado de produtos foi atualizado com sucesso',
+ 'configurable-error' => 'Por favor, selecione pelo menos um atributo configurável.',
+ 'categories' => 'Categorias',
+ 'images' => 'Imagens',
+ 'inventories' => 'Os inventários',
+ 'variations' => 'Variações',
+ 'product-link' => 'Produtos Vinculados',
+ 'cross-selling' => 'Venda cruzada',
+ 'up-selling' => 'Acima de vender',
+ 'related-products' => 'Produtos relacionados',
+ 'product-search-hint' => 'Comece a digitar o nome do produto',
+ 'no-result-found' => 'Produtos não encontrados com o mesmo nome.',
+ 'searching' => 'Procurando ...'
],
-
'attributes' => [
'title' => 'Atributos',
'add-title' => 'Add Atributo',
@@ -403,7 +417,15 @@ return [
'is_filterable' => 'Usar na navegação em camadas',
'is_configurable' => 'Usar para Criar Produtos Configuráveis',
'admin_name' => 'Admin Nome',
- 'is_visible_on_front' => 'Visível na página de exibição do produto no front-end'
+ 'is_visible_on_front' => 'Visível na página de exibição do produto no front-end',
+ 'swatch_type' => 'Tipo de amostra',
+ 'dropdown' => 'Suspenso (a)',
+ 'color-swatch' => 'Amostra de cor',
+ 'image-swatch' => 'Amostra de imagem',
+ 'text-swatch' => 'Amostra de texto',
+ 'swatch' => 'Swatch',
+ 'image' => 'Imagem',
+ 'file' => 'Arquivo'
],
'families' => [
'title' => 'Famílias',
@@ -449,7 +471,6 @@ return [
'image' => 'Imagem',
]
],
-
'configuration' => [
'title' => 'Configuração',
'save-btn-title' => 'Salvar',
@@ -457,7 +478,6 @@ return [
'yes' => 'Sim',
'no' => 'Não',
'delete' => 'Deletar',
-
'tax-categories' => [
'title' => 'Categorias de Imposto',
'add-title' => 'Add Categorias de Imposto',
@@ -474,7 +494,6 @@ return [
'edit-button-title' => 'Editar Categorias de Imposto'
]
],
-
'tax-rates' => [
'title' => 'Taxas de Impostos',
'add-title' => 'Add Taxas de Imposto',
@@ -494,8 +513,8 @@ return [
'edit-button-title' => 'Editar Taxa'
],
'zip_code' => 'CEP',
+ 'is_zip' => 'Ativar intervalo de CEP'
],
-
'sales' => [
'shipping-method' => [
'title' => 'Método de Entregas',
@@ -506,7 +525,6 @@ return [
]
]
],
-
'settings' => [
'locales' => [
'title' => 'Idiomas',
@@ -516,7 +534,11 @@ return [
'save-btn-title' => 'Salvar Idioma',
'general' => 'Geral',
'code' => 'Código',
- 'name' => 'Nome'
+ 'name' => 'Nome',
+ 'create-success' => 'Local criado com sucesso.',
+ 'update-success' => 'Localidade atualizada com sucesso.',
+ 'delete-success' => 'Locale excluído com sucesso.',
+ 'last-delete-error' => 'Pelo menos um local é obrigatório.'
],
'countries' => [
'title' => 'Países',
@@ -534,7 +556,11 @@ return [
'general' => 'Geral',
'code' => 'Código',
'name' => 'Nome',
- 'symbol' => 'Símbolo'
+ 'symbol' => 'Símbolo',
+ 'create-success' => 'Moeda criada com sucesso.',
+ 'update-success' => 'Moeda atualizada com sucesso.',
+ 'delete-success' => 'Moeda excluída com sucesso.',
+ 'last-delete-error' => 'Pelo menos uma moeda é necessária.'
],
'exchange_rates' => [
'title' => 'Taxas de Câmbio',
@@ -544,7 +570,11 @@ return [
'general' => 'Geral',
'source_currency' => 'Moeda de Origem',
'target_currency' => 'Moeda Alvo',
- 'rate' => 'Taxa'
+ 'rate' => 'Taxa',
+ 'create-success' => 'Taxa de Câmbio criada com sucesso.',
+ 'update-success' => 'Taxa de Câmbio atualizada com sucesso.',
+ 'delete-success' => 'Taxa de Câmbio excluída com sucesso.',
+ 'last-delete-error' => 'Pelo menos uma taxa de câmbio é necessária.'
],
'inventory_sources' => [
'title' => 'Origens do Estoque',
@@ -570,7 +600,11 @@ return [
'priority' => 'Prioridade',
'latitude' => 'Latitude',
'longitude' => 'Longitude',
- 'status' => 'Status'
+ 'status' => 'Status',
+ 'create-success' => 'Fonte de inventário criada com sucesso.',
+ 'update-success' => 'Fonte de inventário atualizada com sucesso.',
+ 'delete-success' => 'Fonte de inventário excluída com sucesso.',
+ 'last-delete-error' => 'Pelo menos uma fonte de inventário é necessária.'
],
'channels' => [
'title' => 'Canais (Lojas)',
@@ -594,9 +628,12 @@ return [
'home_page_content' => 'Conteúdo da Página Inicial',
'footer_content' => 'Conteúdo do Rodapé',
'logo' => 'Logo',
- 'favicon' => 'Favicon'
+ 'favicon' => 'Favicon',
+ 'create-success' => 'Canal criado com sucesso.',
+ 'update-success' => 'Canal atualizado com sucesso.',
+ 'delete-success' => 'Canal excluído com sucesso.',
+ 'last-delete-error' => 'Pelo menos um canal é necessário.'
],
-
'sliders' => [
'title' => 'Sliders',
'add-title' => 'Criar Slider',
@@ -613,7 +650,6 @@ return [
'delete-success' => 'Não foi possível excluir o slider',
'delete-fail' => 'Slider excluído com sucesso'
],
-
'tax-categories' => [
'title' => 'Categorias de Imposto',
'add-title' => 'Criar Categoria de Imposto',
@@ -636,7 +672,6 @@ return [
'atleast-one' => 'Não é possível excluir a última Categoria de Imposto',
'delete' => 'Categoria de Imposto excluída com sucesso'
],
-
'tax-rates' => [
'title' => 'Taxas de Impostos',
'add-title' => 'Criar Taxas de Impostos',
@@ -665,7 +700,6 @@ return [
'atleast-one' => 'Não é Possível Excluir a Última Taxa de Impostos'
]
],
-
'customers' => [
'groups' =>[
'add-title' => 'Add Grupo',
@@ -678,14 +712,12 @@ return [
'is_user_defined' => 'Usuário Definido',
'yes' => 'Sim'
],
-
'note' => [
'title' => 'Add Note',
'save-note' => 'Save Note',
'enter-note' => 'Enter Note',
'help-title' => 'Add Note On This Customer'
],
-
'customers' => [
'add-title' => 'Add Cliente',
'edit-title' => 'Editar Cliente',
@@ -706,6 +738,13 @@ return [
'female' => 'Feminino',
'phone' => 'Telefone',
'group-default' => 'Não possível excluir o grupo de cliente.',
+ 'edit-help-title' => 'Editar cliente',
+ 'delete-help-title' => 'Excluir cliente',
+ 'mass-destroy-success' => 'Clientes excluídos com sucesso',
+ 'mass-update-success' => 'Clientes atualizados com sucesso',
+ 'status' => 'Status',
+ 'active' => 'Ativo (a)',
+ 'in-active' => 'Inativo (a)'
],
'reviews' => [
'title' => 'Avaliações',
@@ -714,9 +753,9 @@ return [
'status' => 'Status',
'comment' => 'Comentar',
'pending' => 'Pendente',
- 'approved' => 'Aprovado'
+ 'approved' => 'Aprovado',
+ 'disapproved' => 'Desaprovar'
],
-
'subscribers' => [
'title' => 'Assinantes de Newletter',
'title-edit' => 'Editar Assinante',
@@ -729,12 +768,93 @@ return [
'delete-failed' => 'Erro! Você não pode excluir a inscrição desse usuário',
]
],
+ 'promotion' => [
+ 'catalog-rule' => 'Regras de Catálogo',
+ 'cart-rule' => 'Regras do Carrinho',
+ 'add-catalog-rule' => 'Adicionar regra de catálogo',
+ 'add-cart-rule' => 'Adicionar Regra do Carrinho',
+ 'edit-cart-rule' => 'Editar regra do carrinho',
+ 'edit-catalog-rule' => 'Editar regra do catálogo',
+ 'create-catalog-rule' => 'Criar regra de catálogo',
+ 'create-cart-rule' => 'Criar regra de carrinho',
+ 'save-btn-title' => 'Criar',
+ 'edit-btn-title' => 'Editar',
+ 'save' => 'Salve',
+ 'select-attr' => 'Selecione o atributo',
+ 'select-attr-fam' => 'Selecione a Família de Atributos',
+ 'select-cart-attr' => 'Selecione o atributo Carrinho',
+ 'general-info' => [
+ 'name' => 'Nome da regra',
+ 'description' => 'Descrição',
+ 'starts-from' => 'Começar',
+ 'ends-till' => 'Fim',
+ 'channels' => 'Canais',
+ 'channels-req' => 'Canais',
+ 'cust-groups' => 'Grupos de clientes',
+ 'priority' => 'Prioridade',
+ 'add-condition' => 'Adicionar condições',
+ 'disc_amt' => 'Valor de desconto',
+ 'disc_percent' => 'Porcentagem de desconto',
+ 'is-coupon' => 'Use cupom',
+ 'is-coupon-yes' => 'Sim',
+ 'is-coupon-no' => 'Não',
+ 'uses-per-cust' => 'Usos por cliente',
+ 'all' => 'Todos (a)',
+ 'any' => 'Qualquer',
+ 'end-other-rules' => 'Acabar com outras regras',
+ 'status' => 'Está ativo',
+ 'all-conditions-true' => 'Assumindo que todas as condições sejam verdadeiras',
+ 'assuming' => 'Assumindo',
+ 'any' => 'Qualquer',
+ 'all' => 'Todos (a)',
+ 'conditions' => 'Condições',
+ 'apply' => 'Aplique',
+ 'are' => 'está',
+ 'true' => 'verdade',
+ 'false' => 'falso (a)',
+ 'limit' => 'Limite de uso',
+ 'specific-coupon' => 'Cupom Específico (Cheque) / Gerado Automaticamente (Desmarque)',
+ 'free-shipping' => 'Frete grátis',
+ 'is-guest' => 'Para os hóspedes',
+ 'disc_qty' => 'Max. Quantidade permitida para ser descontado',
+ 'test-mode' => 'Escolha como testar as condições',
+ 'labels' => 'Rótulos'
+ ],
+ 'status' => [
+ 'success' => 'Sucesso! regra criada',
+ 'success-coupon' => 'Sucesso! regra criada junto com o cupom',
+ 'failed' => 'Erro! não conseguiu criar regra',
+ 'update-success' => 'Sucesso! regra atualizada',
+ 'update-coupon-success' => 'Sucesso! regra atualizada junto com cupom',
+ 'update-failed' => 'Erro! não pode atualizar',
+ 'delete-success' => 'Sucesso! regra excluída',
+ 'delete-failed' => 'Erro! não pode apagar',
+ 'coupon-applied' => 'Cupom Usado',
+ 'coupon-failed' => 'O cupom não foi aplicado',
+ 'no-coupon' => '* Cupom não aplicável',
+ 'coupon-removed' => 'Cupom removido com sucesso',
+ 'coupon-remove-failed' => 'Remoção de cupons falhou',
+ 'duplicate-coupon' => 'O cupom já existe, por favor tente novamente com um cupom diferente'
+ ],
+ 'catalog' => [
+ 'name' => 'Nome',
+ 'description' => 'Descrição',
+ 'apply-percent' => 'Aplique como porcentagem',
+ 'apply-fixed' => 'Aplicar como quantia fixa',
+ 'adjust-to-percent' => 'Ajuste para porcentagem',
+ 'adjust-to-value' => 'Ajustar ao valor de desconto',
+ 'condition-missing' => 'Por favor, verifique condições, alguns valores podem estar faltando'
+ ],
+ 'cart' => [
+ 'buy-atleast' => 'Compre Atleast',
+ 'apply-to-shipping' => 'Aplicar ao envio'
+ ]
+ ],
'error' => [
'go-to-home' => 'IR PARA PÁGINA INICIAL',
'in-maitainace' => 'In Maintenance',
'right-back' => 'Be Right Back',
-
'404' => [
'page-title' => '404 Página não Encontrada',
'name' => '404',
@@ -763,14 +883,24 @@ return [
'export' => [
'export' => 'Exportar',
+ 'import' => 'Importar',
'format' => 'Selecione o Formato',
'download' => 'Download',
+ 'upload' => 'Upload',
'csv' => 'CSV',
- 'xls' => 'XLS'
+ 'xls' => 'XLS',
+ 'file' => 'Arquivo',
+ 'upload-error' => 'O arquivo deve ser um arquivo do tipo: xls, xlsx, csv.',
+ 'duplicate-error' => 'Identificador deve ser único, identificador duplicado :identifier na linha :position.',
+ 'enough-row-error' => 'arquivo não tem linhas suficientes',
+ 'allowed-type' => 'Tipo permitido :',
+ 'file-type' => 'csv, xls, xlsx.',
+ 'no-records' => 'Nada para exportar',
+ 'illegal-format' => 'Erro! Este tipo de formato não é suportado ou seu formato ilegal'
],
-
'response' => [
- 'cannot-delete-default' => 'Cannot delete the default channel',
+ 'being-used' => 'Este recurso :name está sendo usado em :source',
+ 'cannot-delete-default' => 'Não é possível excluir o canal padrão',
'create-success' => ':name criado com sucesso.',
'update-success' => ':name atualizaco com sucesso.',
'delete-success' => ':name excluído com sucesso.',
@@ -779,6 +909,70 @@ return [
'attribute-error' => ':name é usado em produtos configuráveis.',
'attribute-product-error' => ':name é usado em produtos.',
'customer-associate' => ':name não pode ser excluído porque o cliente está associado a esse grupo.',
- 'currency-delete-error' => 'Esta moeda é definida como moeda base do canal, então não pode ser excluída.'
+ 'currency-delete-error' => 'Esta moeda é definida como moeda base do canal, então não pode ser excluída.',
+ 'upload-success' => ':name carregado com sucesso.',
+ 'delete-category-root' => 'Não é possível excluir a categoria raiz',
+ 'create-root-failure' => 'A categoria com nome root já existe',
+ 'cancel-success' => ':name cancelado com sucesso.',
+ 'cancel-error' => ':name não pode ser cancelado.',
+ 'already-taken' => 'O :name já foi tomada.'
],
+
+ 'footer' => [
+ 'copy-right' => '© Copyright '.date('Y').' Webkul Software, Todos os direitos reservados.'
+ ],
+
+ 'admin' => [
+ 'system' => [
+ 'catalog' => 'Catálogo',
+ 'products' => 'Produtos',
+ 'review' => 'Reveja',
+ 'allow-guest-review' => 'Permitir comentário de convidado',
+ 'inventory' => 'Inventário',
+ 'stock-options' => 'Opções de ações',
+ 'allow-backorders' => 'Permitir atrasos',
+ 'customer' => 'Cliente',
+ 'settings' => 'Definições',
+ 'address' => 'Endereço',
+ 'street-lines' => 'Linhas em um endereço de rua',
+ 'sales' => 'Vendas',
+ 'shipping-methods' => 'Métodos de Envio',
+ 'free-shipping' => 'Frete grátis',
+ 'flate-rate-shipping' => 'Envio de taxa fixa',
+ 'shipping' => 'Remessa',
+ 'origin' => 'Origem',
+ 'country' => 'País',
+ 'state' => 'Estado',
+ 'zip' => 'CEP',
+ 'city' => 'Cidade',
+ 'street-address' => 'Endereço',
+ 'title' => 'Titulo',
+ 'description' => 'Descrição',
+ 'rate' => 'Taxa',
+ 'status' => 'Status',
+ 'type' => 'Tipo',
+ 'payment-methods' => 'Métodos de Pagamento',
+ 'cash-on-delivery' => 'Dinheiro na entrega',
+ 'money-transfer' => 'Transferência de dinheiro',
+ 'paypal-standard' => 'Padrão Paypal',
+ 'business-account' => 'Conta de negócios',
+ 'newsletter' => 'Assinatura de Newsletter',
+ 'newsletter-subscription' => 'Permitir assinatura do NewsLetter',
+ 'email' => 'Verificação de e-mail',
+ 'email-verification' => 'Permitir verificação de e-mail',
+ 'sort_order' => 'Ordem de classificação',
+ 'general' => 'Geral',
+ 'footer' => 'Rodapé',
+ 'content' => 'Conteúdo',
+ 'footer-content' => 'Texto de rodapé',
+ 'locale-options' => 'Opções de unidade',
+ 'weight-unit' => 'Unidade de peso',
+ 'design' => 'Design',
+ 'admin-logo' => 'Admin Logo',
+ 'logo-image' => 'Logo Imagem',
+ 'credit-max' => 'Máximo de crédito do cliente',
+ 'credit-max-value' => 'Valor Máximo de Crédito',
+ 'use-credit-max' => 'Use o máximo de crédito'
+ ]
+ ]
];
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
index eb11a5ded..700e3e059 100755
--- a/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/configuration/field-type.blade.php
@@ -82,7 +82,7 @@
-
-
-
{{ __('admin::app.settings.sliders.image') }}
-
+
+ {{ __('admin::app.catalog.categories.image') }}
+
+
+
+
+ @foreach ($errors->get('image.*') as $key => $message)
+ @php echo str_replace($key, 'Image', $message[0]); @endphp
+ @endforeach
+
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php
index 9ba20d41e..853ed2e2a 100755
--- a/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/settings/sliders/edit.blade.php
@@ -47,8 +47,16 @@
@{{ errors.first('channel_id') }}
-
-
path) }}"' :required="true">
+
+ {{ __('admin::app.catalog.categories.image') }}
+
+ path) }}"' >
+
+
+ @foreach ($errors->get('image.*') as $key => $message)
+ @php echo str_replace($key, 'Image', $message[0]); @endphp
+ @endforeach
+
diff --git a/packages/Webkul/Core/src/Http/Controllers/SliderController.php b/packages/Webkul/Core/src/Http/Controllers/SliderController.php
index a0876d4e8..a8f8aaf12 100755
--- a/packages/Webkul/Core/src/Http/Controllers/SliderController.php
+++ b/packages/Webkul/Core/src/Http/Controllers/SliderController.php
@@ -135,7 +135,7 @@ class SliderController extends Controller
{
$slider = $this->slider->findOrFail($id);
- if ($this->slider->findWhere(['channel_id' => core()->getCurrentChannel()->id])->count() == 1) {
+ if ($this->slider->findWhere(['channel_id' => core()->getCurrentChannel()->id])->count() == 1 && ($slider->channel_id == core()->getCurrentChannel()->id)) {
session()->flash('warning', trans('admin::app.settings.sliders.delete-success'));
} else {
try {
diff --git a/packages/Webkul/Product/src/Helpers/View.php b/packages/Webkul/Product/src/Helpers/View.php
index 16bca34d5..fcb11535e 100755
--- a/packages/Webkul/Product/src/Helpers/View.php
+++ b/packages/Webkul/Product/src/Helpers/View.php
@@ -7,22 +7,42 @@ class View extends AbstractProduct
/**
* Returns the visible custom attributes
*
- * @param Product $product
+ * @param Product $product
* @return integer
*/
public function getAdditionalData($product)
{
$data = [];
- $attributes = $product->product->attribute_family->custom_attributes()->where('attributes.is_visible_on_front', 1)->get();
+ $attributes = $product->attribute_family->custom_attributes()->where('attributes.is_visible_on_front', 1)->get();
+
+ $attributeOptionReposotory = app('Webkul\Attribute\Repositories\AttributeOptionRepository');
foreach ($attributes as $attribute) {
- $value = $product->{$attribute->code};
+ if ($product instanceof \Webkul\Product\Models\ProductFlat) {
+ $value = $product->product->{$attribute->code};
+ } else {
+ $value = $product->{$attribute->code};
+ }
if ($attribute->type == 'boolean') {
$value = $value ? 'Yes' : 'No';
- } else if ($attribute->type == 'select' || $attribute->type == 'multiselect') {
- $value = $product->{$attribute->code . '_label'};
+ } else if($value) {
+ if ($attribute->type == 'select') {
+ $attributeOption = $attributeOptionReposotory->find($value);
+ if ($attributeOption)
+ $value = $attributeOption->label ?? $attributeOption->admin_name;
+ } else if ($attribute->type == 'multiselect') {
+ $lables = [];
+
+ $attributeOptions = $attributeOptionReposotory->findWhereIn('id', explode(",", $value));
+
+ foreach ($attributeOptions as $attributeOption) {
+ $lables[] = $attributeOption->label ?? $attributeOption->admin_name;
+ }
+
+ $value = implode(", ", $lables);
+ }
}
$data[] = [
diff --git a/packages/Webkul/Product/src/Listeners/ProductFlat.php b/packages/Webkul/Product/src/Listeners/ProductFlat.php
index 9634a53b1..bde6d1473 100644
--- a/packages/Webkul/Product/src/Listeners/ProductFlat.php
+++ b/packages/Webkul/Product/src/Listeners/ProductFlat.php
@@ -102,7 +102,7 @@ class ProductFlat
*/
public function afterAttributeCreatedUpdated($attribute)
{
- if(!$attribute->is_user_defined) {
+ if(! $attribute->is_user_defined || $attribute->is_visible_on_front) {
return false;
}
diff --git a/packages/Webkul/Product/src/Models/ProductFlat.php b/packages/Webkul/Product/src/Models/ProductFlat.php
index c23ecbefa..90caf6b23 100644
--- a/packages/Webkul/Product/src/Models/ProductFlat.php
+++ b/packages/Webkul/Product/src/Models/ProductFlat.php
@@ -13,6 +13,14 @@ class ProductFlat extends Model implements ProductFlatContract
public $timestamps = false;
+ /**
+ * Get the product attribute family that owns the product.
+ */
+ public function getAttributeFamilyAttribute()
+ {
+ return $this->product->attribute_family;
+ }
+
/**
* Get the product that owns the attribute value.
*/
@@ -104,7 +112,7 @@ class ProductFlat extends Model implements ProductFlatContract
*/
public function getReviewsAttribute()
{
- return $this->images()->get();
+ return $this->reviews()->get();
}
/**
diff --git a/packages/Webkul/Product/src/Repositories/ProductFlatRepository.php b/packages/Webkul/Product/src/Repositories/ProductFlatRepository.php
index 0179bc29d..21c153762 100644
--- a/packages/Webkul/Product/src/Repositories/ProductFlatRepository.php
+++ b/packages/Webkul/Product/src/Repositories/ProductFlatRepository.php
@@ -37,16 +37,39 @@ class ProductFlatRepository extends Repository
}
/**
- * Maximum Price of Prodcut
+ * Maximum Price of Category Product
*
* @param int $categoryId
* return integer
*/
- public function getMaximumPrice($categoryId)
+ public function getCategoryProductMaximumPrice($categoryId)
{
return $this->model
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId)
->max('price');
}
+
+ /**
+ * Maximum Price of Product
+ *
+ * return integer
+ */
+ public function getProductMaximumPrice()
+ {
+ return $this->model->max('price');
+ }
+
+ /**
+ * get Category Product
+ *
+ * return array
+ */
+ public function getCategoryProduct($categoryId)
+ {
+ return $this->model
+ ->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
+ ->where('product_categories.category_id', $categoryId)
+ ->get();
+ }
}
\ No newline at end of file
diff --git a/packages/Webkul/Product/src/Repositories/SearchRepository.php b/packages/Webkul/Product/src/Repositories/SearchRepository.php
index c0eb60189..74e8f00c0 100755
--- a/packages/Webkul/Product/src/Repositories/SearchRepository.php
+++ b/packages/Webkul/Product/src/Repositories/SearchRepository.php
@@ -38,17 +38,7 @@ class SearchRepository extends Repository
}
public function search($data) {
- $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
- $searchTerm = explode("?", $query);
- $serachQuery = '';
-
- foreach($searchTerm as $term){
- if (strpos($term, 'term') !== false) {
- $serachQuery = last(explode("=", $term));
- }
- }
-
- $products = $this->product->searchProductByAttribute($serachQuery);
+ $products = $this->product->searchProductByAttribute($data['term']);
return $products;
}
diff --git a/packages/Webkul/Shop/src/Http/Middleware/Currency.php b/packages/Webkul/Shop/src/Http/Middleware/Currency.php
index 06adadcac..cec24fff9 100755
--- a/packages/Webkul/Shop/src/Http/Middleware/Currency.php
+++ b/packages/Webkul/Shop/src/Http/Middleware/Currency.php
@@ -29,15 +29,7 @@ class Currency
*/
public function handle($request, Closure $next)
{
- $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
- $currencyTerm = preg_split('/(\?|&)/', $query);
- $currencyCode = '';
-
- foreach($currencyTerm as $term){
- if (strpos($term, 'currency') !== false) {
- $currencyCode = last(explode("=", $term));
- }
- }
+ $currencyCode = request()->get('currency');
if ($currency = $currencyCode) {
if ($this->currency->findOneByField('code', $currency)) {
diff --git a/packages/Webkul/Shop/src/Http/Middleware/Locale.php b/packages/Webkul/Shop/src/Http/Middleware/Locale.php
index abe038faf..2779fbb6a 100755
--- a/packages/Webkul/Shop/src/Http/Middleware/Locale.php
+++ b/packages/Webkul/Shop/src/Http/Middleware/Locale.php
@@ -29,15 +29,7 @@ class Locale
*/
public function handle($request, Closure $next)
{
- $query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
- $localeTerm = preg_split('/(\?|&)/', $query);
- $localCode = '';
-
- foreach($localeTerm as $term){
- if (strpos($term, 'locale') !== false) {
- $localCode = last(explode("=", $term));
- }
- }
+ $localCode = request()->get('locale');
if ($locale = $localCode) {
if ($this->locale->findOneByField('code', $locale)) {
diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php
index 4eb458ef2..984cfdefc 100755
--- a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php
@@ -43,7 +43,7 @@
getCurrentChannel()->locales) == 1) disabled="disabled" @endif>
@foreach (core()->getCurrentChannel()->locales as $locale)
- @if(isset($serachQuery))
-
+ @if (isset($serachQuery))
+
@else
@endif
@@ -76,8 +76,8 @@