Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix saving of product if price is empty #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

seibtph
Copy link

@seibtph seibtph commented Jan 31, 2023

No description provided.

@blairwinans
Copy link
Contributor

Thanks, @seibtph! Could you just update this to potentially just check for whether $objProduct->getPrice() is null and if so pass 0 to Isotope::formatPriceWithCurrency() so that a price gets set on the $objItem, even if it is 0?

Otherwise I don't think the feed item will be valid. Come to think of it, since I don't think the item would be valid without a price anyhow, should we instead check for this further up in the if($objProduct->isPublished() && $objProduct->useFeed) statement? I think that may be the better way to handle it because I am almost positive a zero-price will not be valid in the feed?

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

Successfully merging this pull request may close these issues.

2 participants