billandr Posted June 16, 2015 Report Share Posted June 16, 2015 I have a need to reply with json data instead of HTML so that front-end on the site can format the information as necessary. I've created the following files: 1. /plugins/bannerTypeJson/oxJson/genericJson.class.php 2. /plugins/bannerTypeJson/oxJson/genericJson.delivery.php 3. /plugins/etc/oxJson/oxJson.xml 4. /plugins/customBannerTypes.xml 5. /lib/OX/Extension/bannerTypeJson/bannerTypeJson.php 6/ /lib/OX/Extension/bannerTypeJson/bannerTypeJsonDelivery.php In #5 above: contentType = json storageType = json Modified config "allowedBanners": json=1 I see the plugin and clicking details shows me everything; but when adding a new banner - I don't see that type listed. I've been looking through the code to see how/where that information is pulled from - but I can't quite seem to locate it. any ideas? Quote Link to comment Share on other sites More sharing options...
billandr Posted June 16, 2015 Author Report Share Posted June 16, 2015 ahh - ok - had to also modify banner-edit to add it to the list; I thought this was something that would dynamically be added; but because I added a new type (json) instead of an HTML type - it didn't show up. andrewatfornax 1 Quote Link to comment Share on other sites More sharing options...
as7us Posted February 17, 2016 Report Share Posted February 17, 2016 Hi, I am trying to return json banners as well, any chance you could share your plugin on a git repo? Quote Link to comment Share on other sites More sharing options...
bartv Posted April 14, 2019 Report Share Posted April 14, 2019 +1 for this, I'm working with XML-RPC banners now but JSON would have much, much less overhead on the server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.