Trading Buttons

I’m trying to get the trading buttons to work but they don’t seem to work on my site. I enabled the plugin in the settings, enabled the checkboxes in the category settings, created a post in that category, and then rebuilt the app container and then created another post in that category and can’t see why they’re not showing up.

Does the plugin work for the newest version of Discourse? Any other things I should check?

2 Likes

Hello Jim, :slightly_smiling_face:

I use this plugin on the latest Discourse and it works for me without any problem.

Just enable the plugin
Screenshot 2022-04-15 at 10.46.52

And set each category where you want to use it.

Screenshot 2022-04-15 at 10.48.31

That’s it! You don’t have to rebuild after enable it on a category it should appear.

One important thing…This is only visible to the topic author. Admins, Mods can’t see it on other members topic.


Or maybe there is a conflict with other plugin. Do you have any error in console?

1 Like

Hmm, the problem seems to be that if I check those 4 checkboxes in the category settings, click save, and then refresh the settings page, those settings are no longer selected.

The only warning (no errors) I’m getting in my console is:

DevTools failed to load source map: Could not load content for https://example.com/service-worker-4f3784769ef61772c375ba22169c3d62c1ec3e1b7b3f5f1d3edffbc06aabc46f.js.map.js: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I tried to disable as many plugins as I could, not sure if this console warning is causing the inability to save these settings and if so, what’s causing the console warning.

1 Like

No, the warning is harmless, you can ignore it.

2 Likes

Ah ok, glad to know, thank you.

I had been testing it in Chrome, now I tested it in Firefox (this time in Safe Mode) and in the console get 1 error:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

and 2 warnings:

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.
unreachable code after return statement ...build-waiter.js:214

I imagine those aren’t related but I’m not sure.

From my somewhat limited understanding, I think inline scripts will conflict with the content security policy. Have you added any inline scripts to your site code?

1 Like

I have but I disabled them and it’s still showing up on Firefox. I’m pretty sure it’s not related to why the trading buttons aren’t showing up, but perhaps I’m wrong.

A question (just in case) … have you tried to restart discourse service after enabling the plugin?

Edit: ah ok, you rebuilt the container. Btw … I have seen this behavior before and this was somehow connected to the fact that I enabled plugin before I rebuilt the container or something like that. It was a long ago. I will try to install it on a fresh environment and will specify exact steps how to enable this

1 Like

Do these trading buttons work with an ecommerce Plugin for Discourse?

This seems like something I’d like to learn more about!

1 Like

No it does not work with eCom plugin. This is separate “poor-man’s” trading solution :wink:

4 Likes

Does it still work fine with latest version? Mine looks broken.

I tested it, and it’s currently broken, yes.

Technically, to make it work, at least add_to_serializer needs to be fixed, and bootbox should be replaced by dialog. This works for me on my dev instance.^

EDIT: can you try this fork? GitHub - Arkshine/discourse-topic-trade-buttons

7 Likes

I’ve just tried your version but buttons don’t show up. Any tricks?

That fork appears to work. Make sure you toggle off/on the permissions in the category after pulling

3 Likes

I installed the plugin today, everything looks good at first glance. But if I publish a post and want to “Sold” it, nothing happens. The buttons don’t respond.

I’ve tried restart and rebuild and nothing helped.
Any ideas?

Hello everybody! I’m not an active Discourse user anymore. But I’m willing to update this plugin for you :slight_smile:

Not behind computer right now but over the weekend will check for pull requests or if not present, will check that fork you’re talking about :wink:

Take care!

7 Likes

Thanks, I will make a PR later!

EDIT: here we go:

6 Likes

Thank you so much! Your plugin becomes the core part of our community :grinning:

4 Likes

Thank you so so much @Arkshine for the amazin work with the upgrade! Plugin is working again :slight_smile: :bowing_man:

4 Likes

Thank you @DaVania for adding Danish translations! :bowing_man:

Supported languages now include:

  • Danish
  • German
  • English
  • Spanish
  • Finnish
  • French
  • Italian
  • Polish
  • Russian

You are welcome to either create a pull request with additional translations or you can contact me directlly if you want to provide translations but don’t know anything about coding. Thanks!

2 Likes