Can I use is_parent?

RolfRolf Member
in Help edited January 2015
I noticed that in the JSON code there's an is_parent flag that I could use in my case to add styling to a shopping cart template. I'm using FC via JSON(P) in this case and the cart template is not the twig template from FC (will be using the templates when doing the checkout steps).

I want to add some styling to bundled products and it's easier to mark a cart row as parent or child when applicable and then style with css, instead of only using parent_code to find the child and then some JS or CSS magic to locate the parent etc.

Though, is_parent is not on the cheat_sheet or mentioned, so should I not rely on it or can I use it? I'm using FoxyCart 2.0, perhaps the key is also in previous versions, but haven't used it with bundles.

Best,
Rolf
Comments
  • fc_adamfc_adam FoxyCart Team
    @Rolf,

    Good question. You should be just fine to use the is_parent flag from the JSON to add any classes to your custom cart for styling. It looks like that wasn't added to the wiki when we implemented that variable so we'll get that updated as well.
  • Cool, thanks
Sign In or Register to comment.