3 users online. Create an account or sign in to join them.Users

Search

Hello,

Want to disclaim that I'm just starting with symphony, and I'm rather new to most everything computer related.

Got it all installed, and I'm working on creating a travel website for a friend of mine. I've created a trip page. She wants to add a paypal buy now button to each trip. Initially I thought great I'll just create another section that she can past the buy now button code into and then pull it out of the XML output.

After the page blowing up with improperly formed XML errors, and subsequent googling I realized embedding HTML in the XML output is not a good thing (told you I'm a noob, be gentle with your ridicule :-)

My question is how would I go about doing this? Is there another way around this issue? I'm sure I could work my way through implementing a more robust payment system, or integrating on some level with paypal's IPN system, but this is a small site, with not a bunch of traffic, and that's all seems a little heavyweight for what we're trying to do.

Can anyone point me in a direction to start down?

Cheers,

Andy

All tags need to be closed properly.

<input type="hidden" name="pp" value="something" />

Notice the /? Whatever your output, think XHTML.

Totally! I figured that I could probably get the syntax down and maybe train my friend to go through and close all the tags that were left open by the paypal pay now button generation function, but it sounded in most of the articles I read that cramming HTML into the XML output of Symphony was not really an ideal way of going about things.

Is there another way I should be approaching this? If not I can certainly help my friend understand how to properly close tags, I just want to understand if there is a better way of accomplishing this goal.

Why don't you simply put the Paypal code in your .xsl stylesheets?

As VladG says, putting the code in your xsl sounds promising. How is your friend generating the buttons? via paypal interface when they are logged in to their paypal account?

And are you using tracking on the buttons?

I have an xsl sheet that is populated from a shop section.

I take the price entry field from my section in my xsl and add that to my paypal button by placing {price} value in the relevant place within the paypal html code, which in turn on the front end of the site (when clicked) takes me to a paypal checkout page generated by paypal.

If I want to add more items to the shop, the 'continue shopping button' takes me back to the previous shop page on my site.

Oh man, I feel dumb, I didn't even think to put the button code in the xsl and just populate any needed information in there from section content.

moonoo2 that's exactly how we want this to work, I'll give that a shot!

Thanks all for your responses!

Cheers

Glad it helped, if you needed xsl sample, post back when required. I'm sure I can dig it out for you. take it easy and enjoy XSLT :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details