You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Ive been investigating the variant system and using it our website to create different models assigned to different option configs.
During this I noticed that, as the title suggests, when you add a variant to the cart, the oc system does a switch and adds the parent/master instead, but with the options specified in the variant.
Im not sure this is the best way, and may even be a mistake, as by adding the master into cart from that point on you loose all overridden fields that may be set in the variant, such as name, model etc. etc.
So in cart, checkout, order notifications, order history and product reordering that data is lost, in fact there is no record which variant product was "ordered" to begin with.
This seems to make no sense seems there is in fact a master_id field in order_product table, showing intention to store a variant product there, but it will never be used with the current method.
I even found out the add to cart system work perfectly fine for adding variants into the cart and checking out and re-ordering, if you comment out the code that switches the variant product id for its master id on add.
I created an issue on github to discuss this potential bug, among a bunch of other more obvious bugs related to variants, some breaking the system so bad its clear no-one is really using it, otherwise they would have been reported by now... and what do you know Daniel just says that is the way its meant to be, and that i shouldnt be bringing this (a potential bug) up here and closes the report... I ask again, why is there a master_id field in the order_product table ? (which seems to be in stark contrast to the "its perfect, go away" response from Daniel) Im not expecting a reply, but im just trying to help, I thought that was the spirit behind opensource, but i guess im just being idealistic ::) In fact ive been watching his behaviour in github to others just trying to help, and sadly its very rude and non-informative.
Anyway I made this post here to make record for anyone else wondering about the topic, to help this community and see what you think about it, maybe the behavior could be an admin option if its agreed that both ways have their uses ?
Here is my bug report which shows the one line that needs to be commented out, so the variant goes into cart instead of master. #12338
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Also posted here some time ago after Daniel closed my git issue immediately with no comment:
https://forum.opencart.com/viewtopic.php?t=231409&sid=e25fdd756b60e3bf8031199de046d846
Hi, Ive been investigating the variant system and using it our website to create different models assigned to different option configs.
During this I noticed that, as the title suggests, when you add a variant to the cart, the oc system does a switch and adds the parent/master instead, but with the options specified in the variant.
Im not sure this is the best way, and may even be a mistake, as by adding the master into cart from that point on you loose all overridden fields that may be set in the variant, such as name, model etc. etc.
So in cart, checkout, order notifications, order history and product reordering that data is lost, in fact there is no record which variant product was "ordered" to begin with.
This seems to make no sense seems there is in fact a master_id field in order_product table, showing intention to store a variant product there, but it will never be used with the current method.
I even found out the add to cart system work perfectly fine for adding variants into the cart and checking out and re-ordering, if you comment out the code that switches the variant product id for its master id on add.
I created an issue on github to discuss this potential bug, among a bunch of other more obvious bugs related to variants, some breaking the system so bad its clear no-one is really using it, otherwise they would have been reported by now... and what do you know Daniel just says that is the way its meant to be, and that i shouldnt be bringing this (a potential bug) up here and closes the report... I ask again, why is there a master_id field in the order_product table ? (which seems to be in stark contrast to the "its perfect, go away" response from Daniel) Im not expecting a reply, but im just trying to help, I thought that was the spirit behind opensource, but i guess im just being idealistic ::) In fact ive been watching his behaviour in github to others just trying to help, and sadly its very rude and non-informative.
Anyway I made this post here to make record for anyone else wondering about the topic, to help this community and see what you think about it, maybe the behavior could be an admin option if its agreed that both ways have their uses ?
Here is my bug report which shows the one line that needs to be commented out, so the variant goes into cart instead of master. #12338
Beta Was this translation helpful? Give feedback.
All reactions