shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 20 forks source link

Admin Product Edit - Shipping Group record is not removed when use default is selected & saved #132

Closed gene-roussetos closed 1 year ago

gene-roussetos commented 1 year ago

Hi, this is more to confirm behaviour on this.

Our client is on Magento 2.4.5-p1 & uses 20.51.6 version of the ShipperHQ module.

  1. A product has a specific Shipping Group selected in the All Store Views scope & the same group only selected in a store scope.
  2. On the store level, If we check the Use Default option & click save the Product, the database entry is not removed but instead it is set to null.

Is this expected behaviour? is there a chance this is an issue with the module in the sense of how the attribute is created? It does feel more like a Magento/Application issue, but thought of asking

Thank you!

Screenshot 2023-03-24 at 17 15 21
WSAlewis commented 1 year ago

Hello @gene-roussetos,

Thanks for reaching out to us.

I've tested this locally and can see the functionality of ShipperHQ receiving the correct attribute is uneffected by this, but from what I understand is that it is adding additional entries into your database.

I'll be raising this to our development team for further confirmation. Just to ask ahead of time, would you be able to confirm the table referenced in the screenshot above?

Either myself or another member of the team will reach out with an update.

Lewis Kennedy - ShipperHQ Support

gene-roussetos commented 1 year ago

@WSAlewis thank you for your reply.

Just to confirm, this is the catalog_product_entity_text table we are referencing

attribute_id 743 is the Shipping Group attribute as shown below (referencing eav_attribute db table)

Screenshot 2023-03-27 at 11 53 49

More or less, we

  1. Expect to have an additional row in the table if a shipping group is selected on store view (value being the same as the All store views)
  2. Expect the additional record (for store view) to be removed once the Use Default is checked.
WSAlewis commented 1 year ago

Thanks for the quick response @gene-roussetos,

I'll pass this feedback across to our team.

Let me know if the status of the issue changes.

WSAlewis commented 1 year ago

Hello @gene-roussetos

We've not been able to reproduce the issue. When following the above instructions, we're observing the entry being removed successfully from the database as expected.

Our development team have commented that attributes we're using are standard Magento 2 attributes, it is likely that you're seeing an arise out of an external customisation or potentially a core M2 issue under specific conditions. It would be worth reproducing the same scenario within a fresh install of Magento 2, this will allow you to phase in any apps/customisations to identify a possible cause.

I hope this helped in providing insight on our side as to where this issue may have occurred from. Please let us know if you come across anything that points towards our module causing the issue and we'll investigate further.

Lewis Kennedy - ShipperHQ Support

gene-roussetos commented 1 year ago

@WSAlewis picked this up again after ages. Magento core bug after all. Commerce module with plugin that sets an empty value on multiselect attributes if value is == null

Quality Patch available ACSD-49835

Fixes the issue where the Use default checkbox value is not saved correctly on a store level for a multi-select attribute.
WSAlewis commented 1 year ago

Hello @gene-roussetos I appreciate you following up here!

Glad to hear that the cause was located and resolved on Magento's side. Should you run into any other issues let us know and we'll investigate further.

Thanks again!

Lewis Kennedy - ShipperHQ Support