Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
Chris Anderson Posted April 20, 2022 Posted April 20, 2022 (edited) Here are copies of the html source code with and without the Buy Button Buy Button Present.txt Buy Button Not Present.txt Edited April 20, 2022 by Chris Anderson
Adriano Faria Posted April 20, 2022 Author Posted April 20, 2022 Sometimes is too vague to me. Provide steps to reproduce.
Chris Anderson Posted April 20, 2022 Posted April 20, 2022 (edited) Fresh install of books. Screenshot of first book added: No "Buy Book" button showing. Click on book and it shows "Buy this book" button: Visit various other parts of the site and return back to "Books" and click on book again: Buy button missing Refresh screen, buy button does not return. Refresh screen, buy button does not return. Exit "Books" Return back to book and the "Buy" button is not present: Refresh screen and "Buy" button appears. Click on "Buy" button and it goes to appropriate Amazon page. Add a new book. No "Buy"button. Refresh screen - No "Buy"button. Log out of website and log back in. Navigate back to book: Buy button present. Log out and login as another user. No Buy button present for the two books, refresh screen and sometimes the "Buy" button appears and sometimes it doesn't. Edited April 20, 2022 by Chris Anderson
Chris Anderson Posted April 20, 2022 Posted April 20, 2022 To eliminate the Edge Browser from being the contributing cause of the problems I"m seeing I checked the following Browsers with the same results: Chrome Firefox Opera
Adriano Faria Posted April 25, 2022 Author Posted April 25, 2022 On 4/20/2022 at 12:05 PM, Chris Anderson said: To eliminate the Edge Browser from being the contributing cause of the problems I"m seeing I checked the following Browsers with the same results: Chrome Firefox Opera Will try to reproduce. On 4/23/2022 at 11:42 PM, bing11 said: how can remove "buy this book" button ? Books settings: bing11 1
Adriano Faria Posted April 28, 2022 Author Posted April 28, 2022 On 4/20/2022 at 10:17 AM, Chris Anderson said: I've tried utilizing the Amazon Affiliate Program settings for both the User and Site with the same results. None of the books I add will consistently show the "Buy" button. Provide the ISBN for these books so I can test. The script checks it the URL is a valid URL and if it doesn't return a HTTP response 200, it won't show the button.
Square Wheels Posted April 29, 2022 Posted April 29, 2022 On 8/19/2020 at 6:22 AM, ibaker said: All good now @Adriano Faria and thanks...i have added a "How To" text at the top and removed the B&N link code in the core file. This means that if the 13 digit code is used, the "Buy Now" B&N link is not shown: Hi, That text looks very helpful, how did you add it? Thanks
Chris Anderson Posted May 2, 2022 Posted May 2, 2022 (edited) On 4/28/2022 at 12:45 PM, Adriano Faria said: Provide the ISBN for these books so I can test. The script checks it the URL is a valid URL and if it doesn't return a HTTP response 200, it won't show the button. I checked all books via the following website: Google Books I only added books that the ISBN numnber I inputted populated all of the fields. The ISBN list I attached all displayed the buy button for brief periods of time. books.txt For the very first time there was an error logged: Edited May 2, 2022 by Chris Anderson
Adriano Faria Posted May 2, 2022 Author Posted May 2, 2022 (edited) The error is clear and it is about the URL taking more than 3 seconds to load for some reason. That’s why the BUY THIS BOOK button doesn’t show up in this book. Let me know if you want to increase the seconds in your install. I won’t change it in the app. Edited May 2, 2022 by Adriano Faria
Chris Anderson Posted May 2, 2022 Posted May 2, 2022 13 minutes ago, Adriano Faria said: Let me know if you want to increase the seconds in your install. I won’t change it in the app. I'm willing to tweak the code to see if it will solve the problem.
Adriano Faria Posted May 2, 2022 Author Posted May 2, 2022 (edited) 8 hours ago, Chris Anderson said: I'm willing to tweak the code to see if it will solve the problem. Ok. Open applications/books/modules/front/books/view.php and find: $page = \IPS\Http\Url::external( $buyUrl )->request( 3 )->get(); if( $page->httpResponseCode == 200 ) { $showBuyButton = TRUE; } You can increase the 3 there or simply remove it all and leave only $showBuyButton = TRUE;. That will make the button always to show up, even if the link is not accessible. Edited May 2, 2022 by Adriano Faria
Chris Anderson Posted May 14, 2022 Posted May 14, 2022 @Adriano Faria I am wanting to utilize Amazon Affiliate program and noticed quite a number of books I attempted to add will not work as Amazon does not consistently have an ISBN-10 number assigned to the book or they have an ISBN-13 number listed instead. As your app currently forwards to Barnes & Noble if an ISBN-13 number is provided many books I would like to add can't if I want to generate affiliate revenue from them. Could you please tweak your code to allow for both ISBN-10 & ISBN-13 numbers for Amazon? Thanks
Adriano Faria Posted May 15, 2022 Author Posted May 15, 2022 Not for now, sorry. That would require a big change and can’t do it now. In a future version.
hayleyflynnbcf@gmail.com Posted August 6, 2022 Posted August 6, 2022 Hi, we just got this (absolutely love the idea for our book-themed forum!) and I'm not sure if I'm doing something wrong but every time I enter an ISBN I just get a 'this field is required' error. Any ideas? Thanks! Adriano Faria 1
Adriano Faria Posted August 6, 2022 Author Posted August 6, 2022 2 hours ago, hayleyflynnbcf@gmail.com said: Hi, we just got this (absolutely love the idea for our book-themed forum!) and I'm not sure if I'm doing something wrong but every time I enter an ISBN I just get a 'this field is required' error. Any ideas? Not sure I follow. I tested it a month ago in 4.7 and worked fine. Do you type the ISBN on book post screen, it retrieves the book data and then shows an error (missing ISBN) when you try to save?
hayleyflynnbcf@gmail.com Posted August 8, 2022 Posted August 8, 2022 It's more as though it doesn't recognise that I've entered an ISBN at all. This is what happens: Then, after pressing 'add book': So I can't actually add anything to the shelf.
Adriano Faria Posted August 8, 2022 Author Posted August 8, 2022 3 minutes ago, hayleyflynnbcf@gmail.com said: It's more as though it doesn't recognise that I've entered an ISBN at all. This is what happens: Then, after pressing 'add book': So I can't actually add anything to the shelf. Nope, that’s not how shelves works. You can only add existing books (in the app) in shelves. It is requesting a book, as you can see, not the ISBN. So type a book title already added to the app instead.
hayleyflynnbcf@gmail.com Posted August 8, 2022 Posted August 8, 2022 Ah! Right, sorry. As entering book data into the search (title, name etc.) didn't do anything I thought it must be asking for the ISBN. I've clearly set something up wrong here (and please excuse the stupid questions, it's the first time I've used a marketplace app!) - where/how should I be adding books into the app?
Adriano Faria Posted August 8, 2022 Author Posted August 8, 2022 5 minutes ago, hayleyflynnbcf@gmail.com said: where/how should I be adding books into the app? Create categories. Give groups the proper permission. Click in + Create menu, choose a category and type the ISBN. Save.
hayleyflynnbcf@gmail.com Posted August 8, 2022 Posted August 8, 2022 1 hour ago, Adriano Faria said: Click in + Create menu, choose a category and type the ISBN. I'm really sorry for being a pain but this is the part I don't quite get. Where do I just enter the ISBN? I can create categories (and subcategories by clicking the +) then go over to the forum and add whatever I want to the shelf by giving all of it's information under 'submit a book', but it's supposed to be pulling that information from Google books automatically, right?
Adriano Faria Posted August 8, 2022 Author Posted August 8, 2022 (edited) No, mate! Create the categories and add books to them and after that go to your shelf and choose any existing book (from anyone, not only the ones you submitted) by typing its name in that popup and add it to the shelf. You don’t add books to shelves directly; you select existing books! Shelves is just a showcase of existing books from the categories! I will make a screen video later. Edited August 8, 2022 by Adriano Faria
Adriano Faria Posted August 8, 2022 Author Posted August 8, 2022 2 hours ago, Adriano Faria said: No, mate! Create the categories and add books to them and after that go to your shelf and choose any existing book (from anyone, not only the ones you submitted) by typing its name in that popup and add it to the shelf. You don’t add books to shelves directly; you select existing books! Shelves is just a showcase of existing books from the categories! I will make a screen video later. Here goes 2 ways to add a book (existing book!) to a shelf: via book (in the book view) via shelf -> Add book -> selecting an existing book
hayleyflynnbcf@gmail.com Posted August 8, 2022 Posted August 8, 2022 OH!! I'm an idiot, sorry, that makes so much sense 😅. Thank you for taking the time to explain! Adriano Faria 1
Adriano Faria Posted September 13, 2022 Author Posted September 13, 2022 New version submitted to fix the incompatibility with IPS 4.7.2.
Recommended Posts