You are here:  » Using Bootstrap

Using Bootstrap

Submitted by Selector84 on Fri, 2016-02-19 01:58 in

Hi David,

Applying the accordion bootstrap from here into the settings when products are virtual is quite straight forward.

When using the Beta 3 with imported posts it looks this can't be implemented without some difficulty due to the way the php works differently with the variables and div tags?

Can send over my .json working file in virtual mode.


Submitted by support on Sat, 2016-02-20 09:08

Hello Sean,

I just ran a test by inserting some simple JavaScript into the Product / Main template and seems to have worked OK, there is no sanitising post body at all so the template should be able to contain unrestricted HTML. A couple of notes however;

- Makes sure that the template content added to construct the accordion is not within the %IF_VIRTUAL% ... %ENDIF_VIRTUAL% section.

There are also a couple of considerations that would need to be made because of the possibility of multiple product posts appearing on the same page;

- The JavaScript includes must only appear once on the page so these should be in the header of your template and not part of the Product / Main template

- The code uses id attributes for example;


These must be unique per product post if it is likely that are ever going to appear on the same page. One easy work around here is that you can output any field from the product table as part of the post using the %DB_fieldname% place holder, so you can prefix all id attribute values with the id field, for example:


That may be all it is, but if still not sure I'd be happy to try it on my test server, email me the templates .json export file, and let me know what WordPress theme I would need to be using to work with your accordion script and I'll check it out..