Giter Site home page Giter Site logo

lsretailomni / lsmag-two Goto Github PK

View Code? Open in Web Editor NEW
9.0 10.0 15.0 17.89 MB

LS Ecommerce - Magento, an ecommerce interface for integrating Magento with LS Central.

Home Page: https://www.lsretail.com/

PHP 86.26% HTML 3.34% CSS 0.96% JavaScript 8.78% Less 0.66%

lsmag-two's Introduction

LS Ecommerce - Magento Integration (V2.4.0)

Compatibility

  1. Magento Open Source 2.3.5 - current version
  2. LS Central 14.02 - current version
  3. LS Commerce Service (formerly Omni Server) 4.5.x - current version

Installation:

Please visit Installation of the LS eCommerce - Magento Extension section on our Online Help for instructions on how to install the extension.

Configuration:

Please visit General Configuration section on our Online Help for instructions on how to configure the extension.

Supported Features:

Please visit Features section on our Online Help for list of supported features.

LS Commerce Service (formerly Omni Server):

To understand more about the LS Commerce Service API's, please visit eCommerce API for LS Commerce section on our Online Help.

Support

All LS Retail active partners can use LS Retail Portal to submit the technical support request.

lsmag-two's People

Contributors

bajaj-sudhanshu avatar lsretailomni avatar r4t4 avatar sudhanshu-bajaj avatar syedwaqasnabi avatar tristanhofman avatar umarusaf902 avatar umaryo-maker avatar zeeshan2523806 avatar zeeshanlsretail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsmag-two's Issues

Partial invoice and Partial refund

Preconditions (*)

When the order has multiple items, and you try to create a partial invoice and partial refund, the invoice total or credit memo will be calculated in a wrong way

Steps to reproduce (*)

  1. Create an order with multiple items
  2. Create a partial invoice or Partial refund

Expected result (*)

  1. Total calculation is correct

Actual result (*)

  1. Total calculation is wrong

Code that causes the issue:
for invoice: src/Omni/Model/Invoice/Total/GiftCardLoyaltyPoints.php
for a refund: src/Omni/Model/Creditmemo/Total/GiftCardLoyaltyPoints.php

$grandTotalAmount = $invoice->getOrder()->getGrandTotal();
$baseGrandTotalAmount = $invoice->getOrder()->getBaseGrandTotal();
$invoice->setGrandTotal($grandTotalAmount); // we are re-seting grand total from order regardles the items we are invpoicing
$invoice->setBaseGrandTotal($baseGrandTotalAmount); // we are re-seting base grand total from order regardles the items we are invoicing

I have error when Creating Member Contact In First Time

Preconditions (*)

  1. LS Central 14.0.2
  2. Ls Omni Server 4.8
  3. Magento 2.3.3
  4. LS magento Extension 13.2

Steps to reproduce (*)

  1. When i create Contact i have this error
    how to solve it .?
    2020-06-18

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]

Issue in cart when logging in

Preconditions (*)

  1. Magento 2.3.5
  2. lsretail v1.6.1

Steps to reproduce (*)

  1. You start as a guest and you put something in the cart
  2. Log in with an existing account
  3. Log out
  4. Log in again

Expected result (*)

  1. No issues

Actual result (*)

  1. a console log is thrown with the following error:
<b>Fatal error</b>:  Uncaught Error: Call to a member function getOrderLines() on null in /vendor/lsretail/lsmag-two/src/Omni/Helper/BasketHelper.php:893
Stack trace:
#0 /vendor/lsretail/lsmag-two/src/Omni/Plugin/Checkout/CustomerData/Cart.php(101): Ls\Omni\Helper\BasketHelper->getItemRowTotal(Object(Magento\Quote\Model\Quote\Item\Interceptor))
#1 /vendor/magento/framework/Interception/Interceptor.php(146): Ls\Omni\Plugin\Checkout\CustomerData\Cart->afterGetSectionData(Object(Magento\Checkout\CustomerData\Cart\Interceptor), Array)
#2 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\CustomerData\Cart\Interceptor->Magento\Framework\Interception{closure}()
#3 /generated/code/Magento/Checkout/CustomerData/Cart/Interceptor.php(26): Magento\Checkout\CustomerData\Cart\Interceptor->___callPlugins('getSectionData in <b>/vendor/lsretail/lsmag-two/src/Omni/Helper/BasketHelper.php</b> on line <b>893</b><br />

There should be done a better check on the order lines.

Inventory status Replication Issue

Preconditions (*)

  1. Magento V2.3.3
    2-Ls Retail Magento 2 Extension
  2. Omni Server 4.2
  3. LS Central 14.1

Steps to reproduce (*)

  1. Configure Ls Retail Module to my Omni server
  2. php bin/magento cron:run
  3. Wait to Results

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. I have all Products With Quantity 0 .
    image

2- all Replicated data with inventory with quantity 0
image

there is my Ls Retail Configuration.
image

what should i do to Replicate All Product With Its Quantities in inventory Successfully.

ContactCreate Operation validation

Preconditions (*)

  1. magento 2.3.3
  2. Ls Omni 4.8
  3. LS Central 14.0.2
  4. LS mag extension 1.3.2

Steps to reproduce (*)

  1. Create new account with same mail or username exist on Ls central Member Contacts but not exist in Magento Customers
  2. the account will created successfully on magento but will be not created on LS Central
  3. need to show any error occurs on omni server in magento Screen

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]

ACL isn't working properly for the LS Retail menu in the admin

Hi guys

We need to give access to a third party for your extension in the admin of Magento.
But when providing them the necessary access rights in a custom administrator role, they can't see the menu 'LS Retail'

Here's steps to reproduce:

  1. Setup a clean Magento 2.3.4 project
  2. Using composer, install this module: composer require lsretail/lsmag-two (I'm getting version 1.2.1)
  3. Run bin/magento setup:upgrade
  4. Login to the admin as a full admin user
  5. Notice you see the menu: 'LS Retail'
  6. Go to System => User Roles and click the 'Add a New Role' button
  7. Give the role a name, input the current admin's password and in the Role Resource section, check the following boxes:
  • Stores > Settings > Configuration > LS Retail
  • Stores > Settings > Configuration > LS Omni Service
  • LS Retail (and all underlying checkboxes)
  1. Save the role
  2. Go to System => All Users and click the 'Add New User' button
  3. Fill in some dummy details and make sure you select the role you created in step 7.
  4. Save the new user
  5. Logout as administrator
  6. Log back in with the new administrator user you created in step 10
  7. Notice that you only see the configuration of the LS Retail module, but you don't see the LS Retail menu in the navigation

Would be great if you could fix this, or if I'm making a mistake in the role permissions setup, you tell me what mistake I'm making.

Thanks!

Unit tests are not passing

Preconditions (*)

  1. Magento 2.4.3-p2, Magento 2.4.4-p1
  2. LS Central version 14.99 - 18.00
  3. Phpunit "phpunit/phpunit": "^9",
    Company: Hagar

Steps to reproduce (*)

  1. ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml

Expected result (*)

  1. Unit tests should pass

Actual result (*)

  1. The same error for every unit test class
    PHP Fatal error: Declaration of Ls\Omni\Test\Unit\Client\PingTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void

ResetReplDiscountStatusTask Always truncate discounts on ALL stores, even if you trigger it on just one store

Preconditions (*)

  1. Magento ver. 2.4.2-p1
  2. [Commerce Service for LS Central DB] & [LS SaaS] & [LS Central WS] LS:22.1 (23.0.6.1005108 [13659])
  3. CS:2023.10.0
  4. LS Magento: 2.4
  5. LS Retail Partner - Dizparc

Steps to reproduce (*)

  1. Have multiple stores configured with previously synced discounts
  2. Manually trigger discount_reset in Magento Admin on a single store

Expected result (*)

There are two options

  1. Either force the ResetReplDiscountStatusTask to always run on all stores, and truncate the magento discount-tables after the loop.
  2. Find another solution to only reset the discount-tables on the store running the cron.

Actual result (*)

When running the reset on a select Store, the magento discount-tables are truncated, resulting a truncate on ALL stores, not just the one you run ResetReplDiscountStatusTask on. This is not a problem when running reset automatically, since they always run after one another, but when running reset in Admin.

Avoid using core block reference name within core layout scope

Preconditions (*)

  1. Magento OS 2.4.0
  2. LS Central: no idea
  3. LS Omni: no idea
  4. LS eCommerce - Magento: 1.6.1

Steps to reproduce (*)

  1. Use a reference block of order_additional_info which is the core block name in the layout adminhtml/layout/sales_order_view.xml. Ex. layout code:
<?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>
        <referenceBlock name="order_additional_info">
            <block class="VendorName\ModuleName\Block\Adminhtml\Order\View\TestBlock"
                   name="sales_order_test_block_info"
                   template="LittleFarms_Checkout::sales/order/view/test-block.phtml" />
        </referenceBlock>
    </body>
</page>
  1. Go to admin sales order view page
  2. You can't able to see the new custom block.

Expected result (*)

  1. Anyone can use that block as a reference and add a custom block in the admin sales order view page because that is how magento allow to adding a custom block in the sales order view page instead of overwriting the whole phtml template file.

Actual result (*)

  1. Doesn't work after enable this LS Magento connector module. Because one of the block names used exactly the same as the core.

Discussion

You need to avoid using exactly the same block name in your core customization. Here is an example of why that happened:

Filename: vendor/lsretail/lsmag-two/src/Omni/view/adminhtml/layout/sales_order_view.xml

<referenceBlock name="order_info">
        <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_additional_info"
               template="Ls_Omni::order/view/additional-info.phtml" after="-"/>
    </referenceBlock>

Please avoid using order_additional_info. You can rename this by ls_order_additional_info.

Contact Not found

Hello, I've got the following error after the installation.
Could you please let me know how to solve this?

[2019-07-09 10:58:46] main.CRITICAL: Contact Not found. {"exception":"[object] (Ls\Omni\Exception\NavObjectReferenceNotAnInstanceException(code: 1): Contact Not found. at /srv/public_html/vendor/lsretail/lsmag-two/src/Omni/Client/AbstractOperation.php:167, SoapFault(code: 0): Contact Not found. at /srv/public_html/vendor/zendframework/zend-soap/src/Client.php:1166)"} []

php bin/magento omni:client:generate failed with error

Using Magento-CE-2.3.2-2019-06-13-04-07-10.tar.bz2
and version 1.1 of lsmag-two

The following error was encountered.

www-data@ymt-ubuntu1804svr-vm:~/myubuntusvr.localdev/public_html/magento2$ php bin/magento omni:client:generate done cleaning folder ( vendor/lsretail/lsmag-two/src/Omni/ ) PHP Fatal error: Uncaught Error: Class 'Ls\Omni\Code\EntityGenerator' not found in /var/www/myubuntusvr.localdev/public_html/magento2/vendor/lsretail/lsmag-two/src/Omni/Console/Command/ClientGenerate.php:74 Stack trace: #0 /var/www/myubuntusvr.localdev/public_html/magento2/generated/code/Ls/Omni/Console/Command/ClientGenerate/Interceptor.php(37): Ls\Omni\Console\Command\ClientGenerate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #1 /var/www/myubuntusvr.localdev/public_html/magento2/vendor/symfony/console/Command/Command.php(255): Ls\Omni\Console\Command\ClientGenerate\Interceptor->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #2 /var/www/myubuntusvr.localdev/public_html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) in /var/www/myubuntusvr.localdev/public_html/magento2/vendor/lsretail/lsmag-two/src/Omni/Console/Command/ClientGenerate.php on line 74 www-data@ymt-ubuntu1804svr-vm:~/myubuntusvr.localdev/public_html/magento2$

Working for Magento-CE-2.3.1-2019-03-18-06-36-39.tar.bz2

Failed bin/magento omni:client:generate

[extensiondemo@c132g healthyplanetcanada]$ php71 bin/magento omni:client:generate

In Socket.php line 278:

Unable to connect to omnihp.ecadvance.com:443 . Error #0: stream_socket_client(): unable to connect to omnihp.ecadvance.com:443 (Connection timed out)

In Socket.php line 272:

stream_socket_client(): unable to connect to omnihp.ecadvance.com:443 (Connection timed out)

omni:client:generate [-t|--type TYPE] [-b|--base [BASE]]

Magento 2.3 Compatibility?

Hi Team,

We are in the process of deploying a new Magento 2 site and our developers have asked if this project is v2.3 compatible as their are apparently quite a few structural changes between 2.2 and 2.3.

Thanks!
George

Using the shippingAdditional section in checkout_index_index removes other extra components

Preconditions (*)

  1. all magento versions
  2. all ls retail versions

Steps to reproduce (*)

  1. Install any magento version
  2. Install ls retail module
  3. add a custom module that also uses the shippingAdditional section in the checkout_index_index layout file.

Expected result (*)

  1. see both components in the shippingAdditional section

Actual result (*)

  1. only 1 component will be shown (depending on the order of modules)

Possible solution

A fix for this is using the LayoutProcessor instead of using the checkout_index_index.xml file. I see that the ls retail module already has this in place so this change won't ask a lot of effort.

Missing functionality to update product category

Preconditions (*)

  1. Magento version: 2.4.5 p4
  2. LS eCommerce Magento version - 2.3.0
  3. LS Retail Partner - Hagar

Steps to reproduce (*)

  1. Change product category in BC
  2. Wait some time for executing all crons

Expected result (*)

  1. Product should be moved to new product category.

Actual result (*)

  1. Nothing happens, if You want to move product to another category, You must delete product in magento and import again or do it manually in Magento

Empty string supplied as input when turn on debug

hello
1/php bin/magento omni:client:ping doesn't return anything (no error, no success message)
We are running omniservice via a port (example abc.com:XXXX ) . May I know if that url format is supported?

2/We enabled LS debug option (through the store backend) and LS configuration screen (from Mageento backend) started crashing.
Other commands (such as Ping) also crashs giving this error http://prntscr.com/mqnsix

Create new Account Problem not Synched with Ls Bussines Central 14

when i creating new account from magento i cant find it in Ls central member contacts and i cant make new order in checkout page it is give me a loading Image for long time .

Preconditions (*)

1.Magento V2.3.3
2-Ls Retail Magento 2 Extension 1.3.1
3.Omni Server 4.2
4.LS Central 14.1

Steps to reproduce (*)

  1. Create new Account in magento
  2. Go to Member Contact in Ls Central
  3. Search for my Contact
  4. try to goto checkout page and place order.

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]
    image

image

kiwicommerce/module-cron-scheduler should not be a hard requirement

Hi folks

I just got the assignment from one of our clients to install this module.
But by doing so, I was surprised to see the kiwicommerce/module-cron-scheduler being installed as well.

I quickly searched your code, and I'm not seeing anything making use of that module.
So I'm wondering what the reason was to make it a hard dependency?

Maybe you guys like that module, but be aware that there are multiple other modules out there which provide a very similar functionality. If a shop already has one installed and then installs your module, it would suddenly get a second cron scheduler module installed which they probably don't need and might even conflict with their previously installed one.
It should be up to the store owner to decide if and which cron scheduler module they install.
Other modules shouldn't try to push a particular cron schedule module, right?

I would propose to move the entry for kiwicommerce/module-cron-scheduler from the require section to the suggest section in the composer.json file. And maybe add some kind of notice to the readme file that you guys suggest people to install that module.

Thoughts?

Thanks!

Viewing Previous Orders

Hi -

Do customers have the ability to view past (imported) orders - for example from pre-LS Magento - when this plugin is installed?

Can only seem to get current customer orders displayed, no previous orders at all.

Is this expected?

Issue with Membership Card information not sent to LS Central

Preconditions (*)

  1. Magento - 2.4.0
  2. LS Central - 16.3
  3. LS Omni - 4.13
  4. Cactoz Pte Ltd

Steps to reproduce (*)

  1. Add item to cart as a guest
  2. Login as a member
  3. Item remain in cart, no further modification to the cart
  4. Perform checkout as per normal
  5. Order was created without the membership card ID

Expected result (*)

  1. Order should have been created with the membership card ID

Actual result (*)

  1. Order was created without the membership card ID

Stores Page Error

Preconditions (*)

1.Magento V2.3.3
2-Ls Retail Magento 2 Extension 1.3.1
3.Omni Server 4.2
4.LS Central 14.0

Steps to reproduce (*)

  1. Go to stores Page in Home Page
    2./omni/stores

Expected result (*)

  1. [Screenshots, logs or description]

Actual result (*)

  1. [Screenshots, logs or description]

image

php -f ./bin/magento omni:client:generate

[Exception]
Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1 in /var/www/html/mag
ento/vendor/lsretail/lsmag-two/src/Omni/Service/Soap/Client.php on line 44

omni:client:generate [-t|--type TYPE] [-b|--base [BASE]]

Exception in Ls\Replication\Cron\ProductCreateTask::caterItemsRemoval

There is uncatched exception in Ls\Replication\Cron\ProductCreateTask::caterItemsRemoval
on $this->productRepository->get($sku, true, $this->store->getId())

You are catching wrong exception. Exception instead \Exception.

Preconditions (*)

  1. Magento 2.4.3.p2 - 2.4.5
  2. LS eCommerce - Magento version 1.14 - 2.2.0

Steps to reproduce (*)

  1. Run cron job with name 'repl_products' manually.
  2. Have not existing sku in data table.

Expected result (*)

  1. Exception should be catched. Logs should be in replication.log

Actual result (*)

  1. Exception - The product that was requested doesn't exist. Verify the product and try again. without any logging.

Obsolete _isScopePrivate property in blocks

Preconditions (*)

  1. Magento Version 2.4.3
  2. LS Retail Partner name - Hagar
  3. LS eCommerce - Magento version 1.18 - 2.3.0

The following table shows the private content block(s) that have the _isScopePrivate
variables configured making the block not cacheable.

app/code/Ls/Omni/Block/Cart/Coupons.php
app/code/Ls/Omni/Block/Cart/Giftcard.php
app/code/Ls/Omni/Block/Cart/Loyaltypoints.php

This property is obsolete and will not work properly.
Replace _isScopePrivate property by private content instead.

https://developer.adobe.com/commerce/php/development/cache/page/private-content/

Cache context contains customer id making page cache unique for each customer

Customer id and customer e-mail are added to the HttpContext in Ls\Omni\Plugin\App\Action\Context::aroundDispatch. This causes each customer to have an own page cache built for the entire webshop making page load time slower as they should be.

The values stored in the HttpContext object are loaded later on requests that not seem to be cached. In places like this you can just use the customerSession object (\Magento\Customer\Model\Session) to load this data like you already do when adding the data to the HttpContext object. Since this data is loaded asychronous or in the cart using this methods seems to be redundant.

Preconditions (*)

  1. Magento 2.4.x
  2. lsretail/lsmag-two 2.3.0
  3. Enable Varnish

Steps to reproduce (*)

  1. Login as customer, load random page the is stored in page cache
  2. Refresh page
  3. Login as other customer in same customer group with same currency
  4. Visit the same page

Expected result (*)

  1. Page should be loaded from Varnish giving a 50ms like response

Actual result (*)

  1. The page cache for new customer is not prewarmed and page speed (ttfb) is not a fast as it should be.

Compatible with 2.4.6?

Hi guys, Will this module be compatible with Magento 2.4.6 (which will be released on March 14) ?
Thanks in advance!

SubtotalsAmount update in afterGetSectionData causes issues

Preconditions (*)

  1. Magento 2.4.5
  2. lsretail/lsmag-two 2.3.0

In Ls\Omni\Plugin\Checkout\CustomerData\Cart::afterGetSectionData the values are update in subtotal and subtotalAmount. Instead of setting a subtotal dependent on tax setting it just uses the grand total excluding spent loyalty point of gift card, all including tax. I'm not 100% what this exactly serves for, but this is not a proper way to do so. You would expect the totals calculators to update any totals and usage of sections.xml to match any router having to update the section data.

We are using this module in a Hyvä themes storefront and are in the process of making it compatible with Hyvä themes, but the Hyvä cart compares the subtotal in sectiondata to the subtotal in checkoutConfig.totals.subtotal. If this does not match it is a trigger to refesh the Hyvä cart. Subtotals do not match, so it just keeps on reloading the cart.

Simply commenting out the code updating the subtotalAmount and using sections.xml doesn't give me the proper results. There probably also too many caveats to start refactoring without a vast knowlegde about logic in this module. Could you please take a look a this, because it will be blocking our progress. I also have an issue where tax is substracted from the original tax amount.

We'll see if we can work around it, but updating sectiondata subtotals here seems wrong. Magento provides mechanisms to do it in other ways. The could also form problems in combination with other packages, not just Hyvä themes.

It would be very much appreciated if you can look into this.

Steps to reproduce (*)

  1. Run default Hyvä theme in you Magento install
  2. Add a product to your cart
  3. Go to cart page
  4. Open net panel

Expected result (*)

  1. After coupons are loaded or sections update is run the is no more activity

Actual result (*)

  1. Cart, sections, coupons keep on reloading
    image

Try to avoid overwriting core Magento frontend files

Preconditions (*)

  1. Magento OS 2.3.4
  2. LS Central: no idea
  3. LS Omni: no idea
  4. LS eCommerce - Magento: 1.3.0

Steps to reproduce (*)

  1. Search for Magento frontend files which are being overwritten by this module

Expected result (*)

  1. Finding 0 or as little as possible files

Actual result (*)

  1. Finding many overwritten files

Discussion

Modules should try to avoid overwriting core Magento frontend files, this is usually being done in a custom theme build by an agency or a system integrator.
Having overwritten files in a 3rd party module means you need to keep them updated after every single new Magento release and keeping things backwards compatible will probably become very hard.

Examples

I took the time to compare 2 overwritten phtml files from your module, to figure out the reason why it's getting overwritten.

  1. src/Customer/view/frontend/templates/form/forgotpassword.phtml, this overwrites magento/module-customer/view/frontend/templates/form/forgotpassword.phtml

Problems:

  • Magento updated their phtml files with improved escaping, this was not applied to your overwritten files
  • You've changed the formatting of the code, making it harder to see what you actually changed, please try to avoid changing the formatting of the code
  • The only significant differences I can find after trying to bring your files in line with Magento's core files are:
--- vendor/magento/module-customer/view/frontend/templates/form/forgotpassword.phtml	2020-01-10 06:20:40.000000000 +0100
+++ vendor/lsretail/lsmag-two/src/Customer/view/frontend/templates/form/forgotpassword.phtml	2020-04-29 14:47:30.000000000 +0200
@@ -16,9 +13,9 @@
     <fieldset class="fieldset" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
         <div class="field note"><?= $block->escapeHtml(__('Please enter your email address below to receive a password reset link.')) ?></div>
         <div class="field email required">
-            <label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
+            <label for="email_address" class="label"><span><?= $block->escapeHtml(__('Username/Email')) ?></span></label>
             <div class="control">
-                <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}">
+                <input type="text" name="email" alt="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true}">
             </div>
         </div>
         <?= $block->getChildHtml('form_additional_info') ?>
  • Change 1: you replaced Email with Username/Email
  • Change 2: you changed the type of the input field from email to text and removed the validation for email input

Is there no other way to achieve this? Are these changes really necessary for this module?

  1. src/Customer/view/frontend/templates/form/login.phtml, this overwrites magento/module-customer/view/frontend/templates/form/login.phtml
--- vendor/magento/module-customer/view/frontend/templates/form/login.phtml	2020-01-10 06:20:40.000000000 +0100
+++ vendor/lsretail/lsmag-two/src/Customer/view/frontend/templates/form/login.phtml	2020-04-29 14:56:56.000000000 +0200
@@ -20,9 +19,9 @@
             <fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
                 <div class="field note"><?= $block->escapeHtml(__('If you have an account, sign in with your email address.')) ?></div>
                 <div class="field email required">
-                    <label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
+                    <label class="label" for="email"><span><?= $block->escapeHtml(__('Username/Email')) ?></span></label>
                     <div class="control">
-                        <input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> id="email" type="email" class="input-text" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}">
+                        <input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> id="email" <?php echo $_isLSR ? 'type="text"' : 'type="email"' ?> class="input-text" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-validate="<?php echo $_isLSR ? "{required:true}" : "{required:true, 'validate-email':true}" ?>">
                     </div>
                 </div>
                 <div class="field password required">

We can see basically the same changes as in the forgotpassword.phtml file.

So anyway, my complaint is: are all of these overwrites really necessary? Is there no other way to achieve the same goal? This makes it very hard for agencies or system integrators to figure out why after your module, a bunch of things on the frontend start changing out of nowhere and makes it hard for us to apply Magento upgrades, since who is now responsible for updating overwritten phtml files in a shop? We or you?

Sorry for the lengthy text, and my examples are probably not that good, but there are most likely other parts in your module which can be improved in better ways other then overwriting core Magento frontend files.

Hope this makes sense somehow, thanks!

ProductCreateTask::caterItemsRemoval - productRepository->get not wrapped in a try-catch

We recently had a problem where we got a record in ls_replication_repl_item with "isDeleted" set to true. The problem being that the product with the SKU deleted didn't exist in Magento yet, resulting in ProductCreateTask crashing on the linked line. Wrapping the productRepository->get within the try-catch resolves that.

$productData = $this->productRepository->get($sku, true, $this->store->getId());

Unable to php bin/magento omni:client:generate and bin/magento s:d:c command

[extensiondemo@c132g healthyplanetcanada]$ php71 bin/magento s:d:c
Compilation was started.
%message% 0/7 [>---------------------------] 0% < 1 sec 58.0 MiB%message% 0/7 [>---------------------------] 0% < 1 sec 58.0 MiBProxies code generation... 0/7 [>---------------------------] 0% < 1 sec 58.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% < 1 sec 62.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 62.0 MiB
In Generator.php line 218:

Source class "\Ls\Replication\Model\ReplAttributeOptionValueInterface" for "Ls\Replication\Model\ReplAttributeOptionValueRepository" generation does not exist.

setup:di:compile

SyncPrice fails saving price on Variants of BaseUnitOfMeasure

Preconditions (*)

  1. Magento ver. 2.4.2-p1
  2. [Commerce Service for LS Central DB] & [LS SaaS] & [LS Central WS] LS:22.1 (23.0.6.1005108 [13659])
  3. CS:2023.10.0
  4. LS Magento: 2.4
  5. LS Retail Partner - Dizparc

Steps to reproduce (*)

  1. Sync a Product with variants with BaseUnitOfMeasure set.
  2. Create a configurable product with variants with BaseUnitOfMeasure (SKU-format: "{itemId}-{variantId}")
  3. Trigger sync of price

Expected result (*)

The price to be synced for the variant products

Actual result (*)

There is some logical error in the conditions in SyncPrice here, because if the Variant uses BaseUnitOfMeasure, the variant SKU is {itemId}-{variantId}, but since there is no UnitOfMeasure set on the $replPrice resulting in the SyncPrice-code to assume the variant sku is the format of {itemId}-{variantId}-{sku}

SyncPrice may set the wrong price on variants, depending on the order of the ls_replication_repl_price result

Preconditions (*)

  1. Magento ver. 2.4.2-p1
  2. [Commerce Service for LS Central DB] & [LS SaaS] & [LS Central WS] 22.1 (LS:22.2.9.1004958 [59761])
  3. Commerce Service for LS Central:2023.05.45
  4. LS Magento: 2.3
  5. LS Retail Partner - Dizparc

Steps to reproduce (*)

  1. Set the Price of the Configurable product in ls_replication_repl_price to 0
  2. Set the Prices of the Child-products to anything other than 0
  3. Run SyncPrices-cron for that configurable + children

Expected result (*)

I've been logging all changes to the "price" attribute on products and this is the log after a "normal" by-design SyncPrice-run

[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008: from: 0, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-000: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-001: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-002: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-003: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-004: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-000: from: 0, to: 2499 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-001: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-002: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-003: from: 0, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-004: from: 0, to: 2499 [] []

Actual result (*)

Depending on the order of the rows in ls_replication_repl_price is stored, there may be a problem if the configurable-line comes after the line of a childproduct, because the sync always assumes the child are supposed to have the same price as the configurable.

[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-000: from: 2000, to: 2499 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008: from: 0, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-000: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-001: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-002: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-003: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.ERROR: 100008-004: from: 2000, to: 0 [] []
[2023-10-30 06:43:04] polderPriceHistoryLogHandler.INFO: 100008-001: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-002: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-003: from: 2000, to: 2499 [] []
[2023-10-30 06:43:05] polderPriceHistoryLogHandler.INFO: 100008-004: from: 2000, to: 2499 [] []

The result of this example is that the new price of 100008-000 is marked as successfully imported, but since the parent is imported after, the price is reset to 0, thus the price of the 100008-000 variant is wrongfully set to 0.

UnitCost sql errors

Preconditions (*)

  1. Magento: OS 2.3.4
  2. LS Central version: unknown
  3. LS Omni version: unknown
  4. LS eCommerce - Magento version: 1.3.0

Steps to reproduce (*)

  1. In the backend of Magento, go to LS Retail > Replication Status > Item
  2. Click the column 'Unit Cost' to sort on that column

Expected result (*)

  1. Either not seeing that column, or if it is actually needed, having the filter action not crash the grid

Actual result (*)

  1. Getting an error "Something went wrong with processing the default view and we have restored the filter to its original state."
  2. In the var/log/exception.log file seeing the error:
main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'UnitCost' in 'order clause', query was: SELECT `main_table`.* FROM `ls_replication_repl_item` AS `main_table` ORDER BY UnitCost ASC

Discussion

Since the column UnitCost does not exist in the table ls_replication_repl_item, you should probably remove that column from the ui component grid (and maybe double check if no other columns are incorrectly defined there)

missing translation function in template

Preconditions (*)
Magento 2.4.3-p2, Magento 2.4.4-p1
LS Central version 18.00
Company: Hagar

Steps to reproduce (*)
Ls/Customer/view/frontend/templates/order/totals.phtml

Expected result (*)
Displayed strings should be translated by __() function

Actual result (*)
Missing translation function usage in template

compile error

Dear Team,

I haved a isssue when i compiled detail in below.

PS D:\xampp\htdocs\Magento226> php bin/magento setup:di:compile
Compilation was started.
%message% 0/7 [>---------------------------] 0% < 1 sec 52.0 MiB%message% 0/7 [>---------------------------] 0% < 1 sec 52.0 MiBProxies code generation... 0/7 [>---------------------------] 0% < 1 sec 52.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 2 secs 54.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 2 secs 54.0 MiB

[RuntimeException]
Source class "\Ls\Replication\Model\ReplImageLinkInterface" for "Ls\Replication\Model\ReplImageLinkRepository" gene
ration does not exist.
setup:di:compile

Thanks
Tuan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.