Search

Hi @giorgoskey

I think there's some confusion. Given the context of your XSLT it looks like you're expecting there to be a sold node within the data-products data source (which makes sense), but there isn't one.

My assumption is:

  • You have a products section which contains all of your products.
  • Within this section you have a 'Sold' field you use to flag whether or not an item is available for purchase.
  • You want to check on the front-end if sold is set to 'yes', if so, do something.

The problem is that there is no sold value in your data source. So my assumption is that it hasn't been added to your data source output. It looks like you changed the field type up-thread, so I'm guessing it was in the data-products data source at one point, but when you changed it to be a checkbox it would have been removed, so you need to add it back in again.

If you add a new field to a section, you need to remember to also add it to your data source output if you want it in your XML.

Does that make sense?

Hello again, yes it makes sense. And imagine, it works!!! :)

Thanks everyone for the help!

@nathanhornby I will consider your suggestions for the mistakes you found. Maybe ask again if I need some answers.

Thanks again!

@giorgoskey Glad you got it working!

Please do - and Stack Overflow is a fantastic resource for XSLT specific help by the way!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details