Posts by OriginalEXE

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Hi, why exactly do you need to calculate this? Could you give an example of the usage, as in, what are you trying to achieve with that information.

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

This should do it:

// Validate item purchase code
        $result = array();

        if( !empty($posted['purchasecode']) && !empty($posted['username']) ) {
           [name and ID removed]
            $purchase_code = urlencode($posted['purchasecode']);
            $request_headers  = array( 'http' => array( 'user_agent' => 'Envato API' ) );
            $request_context  = stream_context_create( $request_headers );
            $result_from_json = file_get_contents('http://marketplace.envato.com/api/edge/'.$username.'/'.$api_key.'/verify-purchase:'.$purchase_code.'.json', false, $request_context);
            $result = json_decode($result_from_json, true);
        }

        if( $result['verify-purchase']['item_name'] && !empty($posted['username']) ) {

            if( strcmp( $result['verify-purchase']['buyer'] , $posted['username'] ) !== 0 )
                $errors->add('required-purchasecode', __('That username is not valid for this item purchase code. Please make sure you entered the correct username.', 'woothemes') );

        } elseif ( !empty($posted['purchasecode']) ) {

            if ( !empty($posted['username']) ) $errors->add('required-purchasecode', __('That is not a valid item purchase code.', 'woothemes') );

        }

Have not tested it so needs checking.

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

It’s not about the numbers.

The issue is that the ‘option_name’ row in wp_options table is limited to 64 characters in length which causes issue when theme folder is that long.

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

yes, but I would like if it is a requeriment to upload a wp theme

What does it matter? You know what’s the right way so prefix it anyway, requirement or not.

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Hey!
I just switched to this script a few minutes ago, Its amazing to look at, but I cant find a work around a small problem, ThemeForest is kinda changing my URL :/ So for example, http://www.example.com/#demo is changed to http://www.example.com/%23demo

Can you tell me a work around or something? :/

Hi, glad you like it.

Yeah, TF does that. You can use product GET parameter instead though, like this: http://www.example.com/?product=demo

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Why do you need 4 different loops for this? It can be all done with just one (assuming that all the posts belong to that one category).

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Hi,

Is there a way to make the default view as mobile? Thanks

Cheers, phpbits
Hello, just add this to your css:
.product-iframe {
width: 468px;
}
1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

My suggestion would be to look into resizing on demand, I suggest this library: https://github.com/derdesign/mr-image-resize

I have also written a small WP plugin that hooks into default image resizing that WordPress does, that also generates images only when needed, and not on upload (add_image_size is still used, so no change in your theme code): http://wordpress.org/plugins/optimize-images-resizing/ (github).

Maybe you could make use of the code to get around this restriction (by explaining the reviewer what it does).

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Does this remove the Envato preview bar automatically?

Sure it does :)

1512 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE says

Thanks for this, I want to try this item switcher, but where do I put this file in my server?

Hi, as uziiuzair said, it does not matter where you put it. All you have to do is edit the js file where products are listed and that is it.

by
by
by
by
by
by