msProductDiscounts: событие mspdOnGetShowPrices (внешняя цена показа) - #968
Open
ShevArtV wants to merge 1 commit into
Open
msProductDiscounts: событие mspdOnGetShowPrices (внешняя цена показа)#968ShevArtV wants to merge 1 commit into
ShevArtV wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Документация к новой точке расширения msProductDiscounts 2.3.0-rc.
mspdOnGetShowPricesпозволяет сайту подать компоненту собственную пару «цена показа / старая цена» для конкретного товара: событие генерируется после применения скидок и до расчётаprice_str/old_price_str, поэтому перечёркнутая цена в каталоге и карточке остаётся единым механизмом компонента. Событие генерируется и для товара без скидок — это основной кейс (товар-комплект, выгода которого не выражается ни одной записью скидки).Там же описано свойство
$object->externalPrices, которым сайт заявляет о себе вmspdOnFilterIdsByDiscount: без него товар без скидок до расчёта цены показа не доходит.Добавлено в
events.md— русская и английская версии.