Trying to create simple droplet

Stefek

Looks good, Jurgen.

Good luck with your project.

If you need help on droplets again, just ask. ;-)

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Argos

Thanks for the explanation!

By the way: I needed this droplet to use with a smooth little webshop script: http://codecanyon.net/item/woooshop-shopping-cart-for-every-website/108838

Mind you, it's a very basic shopping cart script, and the admin is not integrated into WB. But it's smooth jQuery and easy to use for clients that don't need a full featured webshop. The droplet can be used for clients to simply add Buy Now buttons to items on regular WB WYSIWYG pages. They only need the item ID from the shop script admin, and put that in the droplet.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Stefek

You're welcome.

The one thing was, you overwrote the variable delivered via [[droplet-macro]]
And the other thing: the single quotes around the variable.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Argos

YES, that works beautifully! Very nice, thank you stefek, I really appreciate your quick help  :-D
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Stefek

Hello Jurgen,
it seemsto me that you're almost done.

Change some lines only:

<?php //colorize the code, ignore this line

$id = (isset($id)) ? $id 'you forgot the ?id parameter';
$retval .= '<span class="wooo" price="true" text="In winkelwagen &raquo;">';
$retval .= $id//remove the '' <- quotes from the variable, otherwise it will be put out asplaintext
$retval .= '</span>';
return 
$retval;


Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Argos

#1
I am trying to create a simple droplet, but being a non-coder this is even too difficult for me. Maybe someone can help me out. Must be very simple for coders  :roll:

I want this output:
<span class="wooo" price="true" text="In winkelwagen »">X</span>where X is the ID I want to set.

So for example I want to create:
<span class="wooo" price="true" text="In winkelwagen »">15</span>with a droplet like [[shop?id=15]]

After looking at other droplets I came up with this code, but it doesn't work:
$id = 'id=';
$retval .= '<span class="wooo" price="true" text="In winkelwagen »">';
$retval .= '$id';
$retval .= '</span>';
return $retval;


It works partially, because it returns:
<span class="wooo" price="true" text="In winkelwagen »">$id</span>

But I cannot figure out the id part... Please help me out! Thanks.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!