Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
First, great module, I've got it running on one site and am getting ready to roll it out on another.
Is there any way to purchase "promotion to front page" or some similar feature?
I think this can also be done by allowing to purchase a feature, but I'm not positive and have been playing with it for a while now with no solid results.
Comments
Comment #1
larowlanHi
This can be done if you know some Drupal coding with a custom module.
Look at hook_commerce_node_checkout_line_item_alter in the api docs. You've got access to the product and the node at the time of add-to-cart. You can test if that product is the 'buy promoted' one and update the node there if you like.
Lee
Comment #2
codenamerhubarb CreditAttribution: codenamerhubarb commentedA bad hack way to achieve this:
In commerce_node_checkout.rules.inc
after these lines:
I added:
...where 13 and 16 are the IDs of my "promote to front page" pay-to-publish products.