Hi,
I have found this module after searching for possible alternatives to MS Scripts Pay to Publish module which seems to have been abandoned by its developer (although latest version of that module is near production stage)
There is no doubt in my mind that much of the code in MS Script modules was "borrowed" from Drupal Commerce modules it seems that at least in case of Pay to Publish module Commerce node checkout could "borrow" quite a bit.
For example:
allow for upgrades/downgrades between different plans
allow for promote to sticky or front page option on each plan
and so on...
Are there any plans to add above mentioned features?
Comment | File | Size | Author |
---|---|---|---|
#11 | commerce_node_checkout-sticky_promote-2354201-9.patch | 9 KB | dimaboychev |
#9 | commerce_node_checkout-sticky_promote-2354201-9.patch | 9.43 KB | dimaboychev |
Comments
Comment #1
larowlanHi
I have no plans to implement those features but you may be able to do something with commerce and rules as it is.
Happy to take patches too.
Lee
Comment #2
marty.true CreditAttribution: marty.true commented+1 for these options.
I used to have a license for MS Pay to Publish and it does work well but now that Commerce is taking over and the Node Checkout module is doing a good job, would love to see it extended to have these options. In spare time, I'll work on extending it either with patches or Rules config.
Would love to see others contribute to the extension of this module to bring those options in.
Comment #3
jprstoney CreditAttribution: jprstoney commentedYep, I'd be interested in a 'pay to promote' feature.
Comment #4
jradpog CreditAttribution: jradpog commentedI managed to sort of get this to work with rules. Created a product in commerce called promote to front (for example) and then with commerce node checkout I added it to the node type I wanted. In rules I cloned the existing 'Publish the nodes that were purchased' rule and added a condition of 'order contains a particular product and put the SKU off this product name'. Then I added another action to the loop in the action section. This action being 'promote content to front page' with the parameter content:[node].
So this seems to work, but I noticed a downside with commerce_node_checkout. It renders the product options on the node/add page as a select box. i.e. only gives one option. So essentially you can't choose multiple products, say: 'sticky', 'promote to front', 'publish'. You would need to have product levels I guess. I.e. silver = publish, gold = publish and post to front etc. and then I haven't figured out a way where a user could upgrade their add at a later date and only pay for the 'promote to front' amount.
Any ideas how I could do this?
I
Comment #5
hoff331 CreditAttribution: hoff331 as a volunteer commentedHi All,
This functionality can be implemented via rules. The following rule export will set the node to "promoted to front page" if the user purchases plan "PREMIUM". The rule is easily modified to set the node to "sticky at top of lists". Simply replace "PREMIUM" with the SKU of your publishing plan, and it works!
To import the rule, click rules > import rule.
Comment #6
hoff331 CreditAttribution: hoff331 as a volunteer commentedPlease test this rule export, if it works as expected perhaps it can get added to the Node Commerce Checkout module.
Comment #7
Agiss CreditAttribution: Agiss commentedHi guys,
I am going to invest some money on extending this module's functionality by adding multiple pricing options to products.
e.g.
a. Product price:£1
b. Product option 1 (Promote Ad to home page) price: +£1
c. Product option 2 (Stick Ad to top of lists) price: +£1Product option 3 (Enter discount code): either –20% or - £1
d. Products and product options filterable in views.
e. Enable nodes to be published without completing the checkout process if product’s price is 0 i.e. when a product’s price is set to 0, or price has been reduced to 0 after a discount.
etc...
If you're willing to contribute please follow the project on peopleperhour.com website
https://www.peopleperhour.com/job/view?id=842983&jobview=1
I look forward to your support.
Thanks
Agis
Comment #8
flaw CreditAttribution: flaw as a volunteer commentedhoff331,
I've tried that rule and it works fine, thanks!
Is there a way to have the commerce node checkout field visible on the form after a user has created the node? so that a user can upgrade their plan after creating the content?
At the moment, once a node is created, the commerce node checkout field is removed from the edit form.
Comment #9
dimaboychev CreditAttribution: dimaboychev at Global Digital Community commented1. After applying the patch, update the module by running “drush updb” or by going to http://your_site/update.php
2. Edit your “Pay to publish” product(s) which should be listed under ‘/admin/commerce/products’
3. You will see two new fields “Sticky Price” and “Promote Price”. Enter desired prices in the fields, enter “0” for a field you don’t want to use or want to make it free if later on you choose that field to be available in your node (step 4).
4. Edit the content type you previously used for Commerce Node Checkout and go to “Commerce Node Checkout” tab. There you will see two new options “sticky” and “promote”. Select both or the one you would like to be available in your node.
5. Go to “Publishing options” tab and make sure Sticky and/or Promote are NOT checked.
If installing the module for the first time with this patch follow steps 2 - 5, but instead of editing you will be creating new product(s) and content type(s).
P.S.
Need to display price next to sticky and promote. Forgot to do this.
Comment #10
larowlannit: > 80
Please use multi-line ifs, not short syntax.
Also, please use ===
I think we need to make these strings configurable on a per-content type basis.
No need for a wrapper here
Needs a docblock and phpcs indenting fixes
Can we use constants for 'Promote' and 'Sticky' - thanks
Please use ===, and should be space after first (
nit: fails phpcs
Shouldn't this happen when the publish happens?
Comment #11
dimaboychev CreditAttribution: dimaboychev at Global Digital Community commentedRevised.
Comment #12
marty.true CreditAttribution: marty.true commentedComment #13
larowlanThis function needs a docblock
Needs to be on one line and start with 'Adds' for user to see it in the UI.
Also, needs to be a docblock and not an inline comment.
Needs a docblock.
Constants need to start with the module name and be upper-case.
e.g. COMMERCE_NODE_CHECKOUT_STICKY
Should these strings be configurable on the content-type, as this text might not suit everyone?
Needs a docblock
I still don't understand why this is done in a hook and not by our module when we handle publishing?
Also needs a test to ensure we don't get future breakage.
See http://cgit.drupalcode.org/commerce_node_checkout/tree/commerce_node_che... for existing test
Comment #14
thecramp CreditAttribution: thecramp commentedhi,
last year i bought the MS script from money script, but there is absolutely no more answer and my licence doesn't work anymore and i need as a lot of us to find a solution to upgrade / downgrade my package... plan ...
i tried the patch, it works i have the promote and sticky in my product .
How can we make those option expire and deactivated after a while ?
Or maybe just upgrade our product by adding this option ( ex: for only 1 month)
Thanks kid regards.
Comment #15
marty.true CreditAttribution: marty.true commented@thecramp: We are using Rules to unpublish nodes after specified times, in combination with the patched module above (my team did the patch). If you are asking if the sticky.promoted elements can be removed from the node but not unpublish the node itself, after some time, this might also be possible with Rules but I haven't tried that... Hope this helps.