Hi, I am very new to coding in general, I have this piece of code which changes the button on page 1 and redirects the user to page 3 as opposed to when they initally subscribe it goes directly to page 2. This works perfectly.
import wixStorage from ‘wix-storage’ ;
import wixLocation from ‘wix-location’ ;
$w . onReady ( function () {
let alreadySub = wixStorage . local . getItem ( “alreadySubscribed” );
if ( alreadySub == “true” ){
$w ( “#button1” ). label = “GO TO TRAINING” ;
$w ( “#button1” ). link = “/legendarymarketer” ;
}
});
Now what I am trying to do on another page is similar to this but instead of once they have subscribed I want it to be once they have downloaded the PDF that the button then directs them to page 3 but also not stored in local this time as they may want to download the pdf again.