Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Delayed action/cart button wordpress? (https://www.warriorforum.com/programming/572715-delayed-action-cart-button-wordpress.html)

Treborrevo 2nd April 2012 12:16 PM

Delayed action/cart button wordpress?
 
Do any of you know of a delayed action script for Wordpress that has a shopping cart button/link pop-up at X minutes into a video presentation?

I know EZS3 has one, as well as JVPress.

Unfortunately I'm semi-committed to Vimeo and my own Wordpress theme --

Would love to know if there is a script/plugin out there I can use.

Thanks in advance if you know the answer to this!

marcuslim 16th April 2012 01:43 AM

Re: Delayed action/cart button wordpress?
 
You can do it if you use the free flowplayer player and customize its 'cue points' so that the button is shown only when a specified play time has elapsed. Yes it can be technical, but PM me and I'll show you how.

emiliobool 16th April 2012 04:51 AM

Re: Delayed action/cart button wordpress?
 
Probably not what you need but you can still use vimeo and its api,

you would just need to add this to that page:

Code:

<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script> 
<script type="text/javascript">

jQuery(document).ready(function() {
    var myPlayer = jQuery('#myPlayer1').get(0);
    var otherElement = jQuery('#otherEl');
    var delay = 120;
    otherElement.hide();
        Froogaloop(myPlayer).addEvent('ready', function() {
            var f = (myPlayer); 
        var i = setInterval(function(){
            f.api('getCurrentTime', function (value, player_id) {
              if(value > delay){
                    otherElement.show();
                    clearInterval(i);
              }
            });
        },1000); 
    });
});
</script>

the code should be self explanatory,
this code will show an element with id "otherEl" after 2 minutes

you also need to modify your video embed code as follows:

<iframe id="myPlayer1" src="http://player.vimeo.com/video/xxxxx?api=1&player_id=myPlayer1" frameborder="0"></iframe>

and that's pretty much it

Treborrevo 3rd September 2012 03:41 PM

Re: Delayed action/cart button wordpress?
 
A very late "thank you" for posting this code. I had stopped looking and did not see your wonderful response. Thank so much.

jhguynn 24th September 2012 08:22 AM

Re: Delayed action/cart button wordpress?
 
There are also WP plugins, like wp-delay-box located here: paulmihaipavel "dot" com "foward slash" wp-delay-box

Snatch 30th September 2012 10:43 AM

Re: Delayed action/cart button wordpress?
 
Quote:

Originally Posted by emiliobool (Post 6053566)
Probably not what you need but you can still use vimeo and its api,

you would just need to add this to that page:

Code:

<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script> 
<script type="text/javascript">

jQuery(document).ready(function() {
    var myPlayer = jQuery('#myPlayer1').get(0);
    var otherElement = jQuery('#otherEl');
    var delay = 120;
    otherElement.hide();
    Froogaloop(myPlayer).addEvent('ready', function() {
        var f = (myPlayer); 
        var i = setInterval(function(){
            f.api('getCurrentTime', function (value, player_id) {
              if(value > delay){
                    otherElement.show();
                    clearInterval(i);
              }
            });
        },1000); 
    });
});
</script>

the code should be self explanatory,
this code will show an element with id "otherEl" after 2 minutes

you also need to modify your video embed code as follows:

<iframe id="myPlayer1" src="http://player.vimeo.com/video/xxxxx?api=1&player_id=myPlayer1" frameborder="0"></iframe>

and that's pretty much it

Is this working with a easy video player embed code or with a amazons3 link? How do I do it?

kevinclanton 2nd October 2012 03:27 PM

Re: Delayed action/cart button wordpress?
 
You can also do something simple like this:

<div id="hid" style="visibility:hidden;" >
HIDDEN Content / Buy Button
</div>

<script type="text/javascript">
//hidden buy button
function showIt() {
document.getElementById("hid").style.visibility = "visible";
}
setTimeout("showIt()", 5000); // 1000 ='s 1 second
</script>

Dansky 2nd October 2012 03:44 PM

Re: Delayed action/cart button wordpress?
 
I use almost same as Kevin posted. Works great.

mark2index 26th August 2014 08:30 AM

Re: Delayed action/cart button wordpress?
 
hi if you are looking to earier way google "mk delay box wordpress plugin"

internetsuperstar 26th August 2014 08:45 AM

Re: Delayed action/cart button wordpress?
 
You can also try OptimizePress.


All times are GMT -6. The time now is 10:01 AM.