Closed (fixed)
Project:
InsertNode
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
12 Aug 2009 at 17:40 UTC
Updated:
8 Mar 2010 at 08:10 UTC
Is it possible to insert information from a node, into another as a button? What I want to do ultimately, is as follows:
<form name="f7" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" border="0" value="Add" sc="cart.gif" name="submit" alt="Buy" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="QQ4DK3RFE22PC" />
<input type="hidden" name="item_name" value="BOOK TITLE GOES HERE" />
<input type="hidden" name="item_number" value="ISBN No GOES HERE" />
<input type="hidden" name="amount" value="PRICE GOES HERE" />
<input type="hidden" name="cn" value="Notes" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="bn" value="PP-ShopCartBF" />
<input type="hidden" name="no_shipping" value="2" />
</form>
Comments
Comment #1
AlexisWilke commentedHi ianstresman,
Well... 8-)
Everything is possible but this is just way too specialized for this very module.
However, this being said, we may want to have a way to let people write a hook and code a function to generate such complex entries.
Could you write that code if I were to offer you the hook?
Thank you.
Alexis Wilke
Comment #2
iantresman commentedUnfortunately I don't have the skills, but thanks for the offer.
Comment #3
AlexisWilke commentediantresman,
If you can pay for that specialized module, I can still do it.
Thank you.
Alexis
Comment #4
iantresman commentedI'll keep that in mind. Thanks.
Comment #5
AlexisWilke commentedHi iantresman,
It seems to me that this is now possible since you can include CCK fields with the cck parameter. So all you have to do is include your form and for the parameters, use one of the CCK field as in:
Does that sound reasonable?
Thank you.
Alexis
Comment #6
iantresman commentedYou're good, and fast. Do you do house decorating? :-)
Thanks for all your help, appreciated.
Comment #7
AlexisWilke commentedHe! He! Is this sarcastic?! 8-)
If house decorating means displaying all the computers & parts I have, then yes.
Let me know if that works for you so we can mark this entry as fixed.
Thank you.
Alexis
Comment #8
iantresman commentedLooking good, but a minor bug. If I add:
<input type="hidden" name="item_name" value="[node:* cck=title;]" />It should produce:
<input type="hidden" name="item_name" value="Node title" />But it adds some superfluous tags:
<input type="hidden" name="item_name" value="<span class="insert-node insert-node2 insert-nid62">Make button</span>" />... and the <span> tags break the form <input> tag.
Here's a test block of code if you need it:
Comment #9
AlexisWilke commentedOkay!
I added two more keywords: plain and repeat.
To use those properly, it is a bit tricky, you want to use plain to avoid the <span> tag in the input tags.
And the repeat is used at the top (where you include the macro) so the content being included is filtered too (repeat filter on the output).
More info in my doc here:
http://www.m2osw.com/doc_insert_node_macro
Thank you.
Alexis