Skip to content

Instantly share code, notes, and snippets.

View shazadmaved's full-sized avatar
🎯
Focusing

shazad maved shazadmaved

🎯
Focusing
View GitHub Profile
@shazadmaved
shazadmaved / gist:8d735d3e3e7bc5c98363670504d6f7c8
Created May 2, 2018 13:10
I have created a function to get all possible promotions of a product by considering even the taxons. Its not yet optimised and not well tested. I added the following in the product decorator model
def get_all_possible_promotions
taxons_of_product_including_parents
end
private
# ids of taxons rules and taxons rules children