Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Special Price on Parent Product #273

Closed
simonmaass opened this issue May 12, 2020 · 6 comments
Closed

Special Price on Parent Product #273

simonmaass opened this issue May 12, 2020 · 6 comments

Comments

@simonmaass
Copy link

simonmaass commented May 12, 2020

I noticed that on some products the parent product has a special price (but there is none configured in magento) and all child product dont have a special price - which is corrent... but why does the parent have a special price configured - that is wrong..

All configurable children have:

"special_price": null,
"special_from_date": null,
"special_to_date": null,

Parent has:

"special_price": 29.95,
"special_from_date": "2019-07-10 00:00:00",
"special_to_date": "2019-07-31 00:00:00",

But in magento there is not special Price!!!!
Unbenannt

Example:

{
"_index": "vue_storefront_magento_1_1589186250",
"_type": "product",
"_id": "380811",
"_version": 1,
"_score": 1,
"_source": {
"attribute_set_id": 25,
"updated_at": "2020-04-02 12:00:20",
"type_id": "configurable",
"sku": "Derby-Faltstock-Soft-Ergonomic",
"id": 380811,
"media_gallery": [
{
"typ": "image",
"image": "/d/e/derby_faltstock_soft_ergonomic.png",
"lab": "",
"pos": 1
}
,
{
"typ": "image",
"image": "/u/n/unbenannt_30.png",
"lab": "",
"pos": 2
}
],
"material": 531,
"adjusting_mechanism": 21,
"side": 24,
"handle_type": 29,
"length_stick": 801,
"hoehenverstellbar": 1,
"image_source": 588,
"delivery_time": 688,
"infoproduct": 0,
"manufacturer": 205,
"status": 1,
"visibility": 4,
"tax_class_id": 4,
"name": "Derby Faltstock Soft-Ergonomic",
"meta_title": "Derby Faltstock Soft | meevo",
"meta_description": "4-teiliger faltbarer schlanker Gehstock aus Aluminium mit Derby-Griff aus Acetat | Entdecke das meevo Sanitätshaus online.",
"image": "/d/e/derby_faltstock_soft_ergonomic.png",
"small_image": "/d/e/derby_faltstock_soft_ergonomic.png",
"thumbnail": "/d/e/derby_faltstock_soft_ergonomic.png",
"url_key": "derby-faltstock-soft-ergonomic-380811",
"hilfsmittelnummer": "10.50.01.1014 ",
"alt_image": "/d/e/derby_faltstock_soft_ergonomic.png",
"description": "Eigengewicht: ca. 440",
"short_description": "Hochwertiger schlanker Faltstock",
**"special_price": 29.95,**
"weight": 0.5,
**"special_from_date": "2019-07-10 00:00:00",
"special_to_date": "2019-07-31 00:00:00",**
"slug": "derby-faltstock-soft-ergonomic-380811",
"url_path": "derby-faltstock-soft-ergonomic",
"category": [
{
"category_id": 14,
"name": "Gehstöcke",
"position": 2
}
],
"category_ids": [
14
],
"final_price": 44.95,
"regular_price": 44.95,
"product_links": [
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Derby-Faltstock-Gastrock",
"linked_product_type": "configurable",
"position": 2
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Derby-Faltstock-Soft-Gastrock",
"linked_product_type": "simple",
"position": 3
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Uni-Relax-Faltstock-Gastrock-rechts",
"linked_product_type": "simple",
"position": 4
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Uni-Relax-Faltstock-Gastrock",
"linked_product_type": "configurable",
"position": 6
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Deluxe-schlank-Faltstock",
"linked_product_type": "simple",
"position": 5
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "wegbegleiter-geschenk-set",
"linked_product_type": "configurable",
"position": 1
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "related",
"linked_product_sku": "Derby-Faltstock-Soft-Ergonomic-Bronze",
"linked_product_type": "simple",
"position": 7
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic",
"link_type": "crosssell",
"linked_product_sku": "wegbegleiter-geschenk-set",
"linked_product_type": "configurable",
"position": 1
}
],
"stock": {
"product_id": 380811,
"item_id": 1070035,
"stock_id": 1,
"qty": 0,
"is_in_stock": true,
"is_qty_decimal": false,
"use_config_min_qty": true,
"min_qty": 0,
"use_config_min_sale_qty": true,
"min_sale_qty": 1,
"use_config_max_sale_qty": true,
"max_sale_qty": 100,
"use_config_notify_stock_qty": true,
"notify_stock_qty": 1,
"use_config_qty_increments": true,
"backorders": true,
"use_config_backorders": true,
"qty_increments": 1,
"use_config_enable_qty_inc": true,
"enable_qty_increments": false,
"use_config_manage_stock": true,
"manage_stock": true,
"low_stock_date": "2019-11-08 15:24:37",
"stock_status": 1
},
"configurable_options": [
{
"attribute_id": 93,
"attribute_code": "color",
"label": "Farbe",
"values": [
{
"value_index": "97",
"label": "Bronze"
}
,
{
"value_index": "200",
"label": "Schwarz"
}
]
}
],
"configurable_children": [
{
"sku": "Derby-Faltstock-Soft-Ergonomic-Schwarz",
"final_price": 44.95,
"regular_price": 44.95,
"status": 1,
"visibility": 1,
"side": 24,
"color": 200,
"name": "Derby Faltstock Soft-Ergonomic-Schwarz",
"image": "/d/e/derby_faltstock_soft_ergonomic_1.png",
"small_image": "/d/e/derby_faltstock_soft_ergonomic_1.png",
"thumbnail": "/d/e/derby_faltstock_soft_ergonomic_1.png",
"price": 44.95,
"special_price": null,
"special_from_date": null,
"special_to_date": null,
"media_gallery": [
{
"typ": "image",
"image": "/d/e/derby_faltstock_soft_ergonomic_1.png",
"lab": "",
"pos": 1
}
],
"id": 381572,
"stock": {
"is_in_stock": true,
"min_qty": 0,
"notify_stock_qty": 1,
"use_config_notify_stock_qty": true,
"qty": 3,
"stock_status": 1
}
}
,
{
"sku": "Derby-Faltstock-Soft-Ergonomic-Bronze",
"final_price": 44.95,
"regular_price": 44.95,
"color": 97,
"status": 1,
"visibility": 1,
"side": 24,
"name": "Derby Faltstock Soft-Ergonomic-Bronze",
"image": "/d/e/derby_faltstock_soft-ergonomic.png",
"small_image": "/d/e/derby_faltstock_soft-ergonomic.png",
"thumbnail": "/d/e/derby_faltstock_soft-ergonomic.png",
"price": 44.95,
"special_price": null,
"special_from_date": null,
"special_to_date": null,
"media_gallery": [
{
"typ": "image",
"image": "/d/e/derby_faltstock_soft-ergonomic.png",
"lab": "",
"pos": 1
}
],
"id": 381573,
"stock": {
"is_in_stock": true,
"min_qty": 0,
"notify_stock_qty": 1,
"use_config_notify_stock_qty": true,
"qty": 2,
"stock_status": 1
}
}
],
"color_options": [
97
,
200
],
"price": 44.95,
"tsk": 1589186250
}
}
@afirlejczyk
Copy link
Contributor

afirlejczyk commented May 12, 2020

I will check, but I can't guarantee I will be able to reproduce the bug. :)
Are you sure that you don't have any records with a special price in the database regarding this product?

@simonmaass
Copy link
Author

@afirlejczyk so i did a deep dive into this problem and was able to see that database entries exist on the configurable product for special price...

I think this is a magento core bug as these values can be set with the "update attributes" mass update!

@afirlejczyk
Copy link
Contributor

Thanks for checking, I will play around this and check how Magento behaves in frontend.
I guess Magento is ignoring this special price - due to using prices from configurable children (in this configuration). I should probably do the same when exporting data.

@simonmaass
Copy link
Author

@afirlejczyk " I should probably do the same when exporting data."

I absolutely agree - cause i am now having this exact problem.. that if the child products have a special price the parent product has a special price of "null".... therefore it is very hard to filter for "All Sale Products" (what we are trying to work in in vuestorefront)

@nitikeshd
Copy link

hi @afirlejczyk ,

In our case, the special_Price and the regular price is not getting updated if i update in the magento side. I do not see that this is a core issue however is there some thing i am missing here?

However if i change the name or other attributes, it changes instantly.

Please confirm!

@afirlejczyk
Copy link
Contributor

Hi @simonmaass,
please check out this PR: #312

I made some cleanup regarding configurable products in M2.
We have some code from M1, in M1 setting up prices for configurable products works differently so this code was not accurate for M2. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants