hi again
inputting more works I got aware that here I get what I want !!
As you may see here I have the pages as I need them, still to make the links.
I attract your attention to the fact that the "I buy" button does not appear in all works of the listing. What could be the reason (I hope it is not the fact that I added it after inputting several works before adding the button).
pls tell me if all this exeeds the subject and I should begin another thread.
thanks
best
Ed.
Hi Ed,
I've checked the 'Lists of Works' page from your screenshot and it is showing the 'Buy' button for all the results on page 1.
Please note that the button is inside a conditional block and will only show if 'Field sold from Current Product is equal to 1.'
( screenshot: hidden link )
regards,
Waqar
hi Waqar
Meanwhile I got aware of a (for me) strange behavior of the system:
when I change the structure (<- content templates) only the newly saved objects ( in this case works) show the change (here the "buy" button).
I am not entirely shure that it is the case for all fiels (I doubt for example the dimension and description field) which appear and are emplty as I await.
so: the button field seems to be an exeption!!! -> to appear it needs a "refresh" (restore of the data <- an interesting effect I am curious why it occurs 😉 )
best
Ed.
hi again:
I was again too quick with my answer as I did not look at your screenshot.
comment: that the button did not appear is in my oppinion not die to the condition (if block) as the field is defined to have a 1 (<- show "buy" button).
best
Ed.
Thanks for writing back.
I'm afraid, I couldn't fully understand what you meant by the "refresh" of the data.
Can you please disable the 'cache' option from the view's settings and see if it has any effect?
( screenshot: hidden link )
If the issue persists, please share the exact steps or a quick screencast, to see how the issue is reproducible.
hi again
question: ¿the "cache" of the view is always on? (<- I suppose that the cache of the view is meant to speed up when the site is in production. I never thought it would be on at setting up)
Ok I
hi
I confirm that the buy button shows up after "refresh" of the data (of the work) for example after introducing and saving the dimensions .
dimensions is a field I added later (after creation of dataset work) in the same way I added the button field but it does not need a "datafield" refresh (in the database) as the button field requests to appear.
could be a simple omission to save the default "1" globally when the "if" field is added <- I mean the field is created and seeded into the database but "empty" as the data of "dimension" is empty in the database after creation.
best
Ed.
Thank you for waiting, while I reviewed the website's data and your observations.
It looks like the field 'sold', on which the condition for the 'buy' button relies on, was set up with a different slug or the values earlier.
As a result, some older posts had that old values stored with them for this field. But when you updated those old posts to change some other data, the value of this 'sold' field also updated correctly. Which is why you observed that on saving/updating the individual posts, the 'buy' button appears.
Currently, there are just two posts ( 'PRESENCIAL' & 'SILENCIO I' ), for which the 'buy' button is not showing. But this is expected since the value of 'sold' field is set to 'sold' (2), for these posts.
so the database does not "update" old entries (after a structure change) until new data is entered at that record.
suggestion:
-> a routine to "refresh" all records of the database (or the part touched by that page/view etc) could come very useful if/when the database gets large.