Jump to content


Replying to Shortcode For Exchange?


Post Options

  or Cancel


Topic Summary

misowrong

Posted 11 March 2015 - 08:28 AM

Okay,

Here we go.  And thanks for your patience!

Ronald

Posted 10 March 2015 - 04:55 PM

Hi,

to add an image, you may want to check the tutorials on how to use the forum: http://ithemes.com/codex/page/Forum_Related

Ronald

misowrong

Posted 10 March 2015 - 04:53 PM

don't know what happened but the attachments didn't appear. probably standard i d 10 t error.

misowrong

Posted 10 March 2015 - 04:45 PM

the first screen shot is where the product is in the top but is using the teaser content from the post in the content section.

The second, the content section is not using a restricted content excerpt and therefore pulls the product info from the product desc.

Ronald

Posted 10 March 2015 - 01:56 PM

Hi,

I am not sure what you mean, can you add a screenshot, indicate what exactly you are referring to?

thanks,
Ronald

misowrong

Posted 10 March 2015 - 10:07 AM

Hi guys! I added mrarlen's code above and everything works great but I'm showing teaser content which over-rides the product description whenever there is any teaser posts. Any ideas?

This only happens when a post snippet that is locked down shows up in the content section. testing site is http://stongeresearch.com

cubixlabs

Posted 28 December 2014 - 01:37 AM

Any thought on this? Unfortunately, after adding the code as mentioned to a button on our front page, when clicked the page reloads adding '/?ite-sw-state=checkout' to the url but nothing else changes on the page/buy button...  Any thoughts?

I am also stuck here while making pricing page for my subscription products.

jryven

Posted 11 December 2014 - 12:40 PM

I have another question for this thread...

Is there a way to pull product variables into the shortcode?

jryven

Posted 25 November 2014 - 05:58 AM

Thanks for pointing out the name-change element, Ronald.  ( I should've looked harder! )

Here's my findings on changing the color of clicked buttons.

First - the closest CSS solution would be to use the :focus state to apply a style. Unfortunately, as soon as the user clicks elsewhere, the color returns to normal. This may be confusing, leading the user to believe that their product had been de-selected.

input.add-to-cart-button:focus {
background: green;
}

Second - a solution with better UX - is to deploy a bit of jquery to add a class to the clicked buttons : http://stackoverflow.com/questions/16240892/jquery-change-button-color-onclick

Unfortunately, we have to rely on jQuery for this solution.

<script>
jQuery(document).ready(function($) {
  $('input[type="submit"]').click(function(){
  if(!$(this).hasClass('clicked-button'))
  $(this).addClass('clicked-button');
});
});
</script>


There's no reason not to use both, though. And that's what I've done. Now, I have purple buttons, they turn green on click ( focus CSS ) and stay green until the user clicks elsewhere, at which point they turn grey ( jQuery class ).

And in this case, if user is not allowing jQuery, there is still a semi-persistent change in style while they shop.

Ronald

Posted 10 November 2014 - 02:36 PM

Hi James,

in the code provided earlier in this topic, you can edit the parameters for the 'get-purchase-options' and override the standard label using the 'add-to-cart-label' parameter, e.g. "Add to Cart" is changed to "Get this" using the following code:

it_exchange( 'product', 'get-purchase-options', array( 'add-to-cart-label' => 'Get this', 'add-to-cart-edit-quantity' => false, 'buy-now-edit-quantity' =>true ) );

That might be a clue,

As for changing the color, that may be done using css, but I am not sure if there is a class for the "clicked" state, you should inspect your site, FIrebug is recommended.

Also, please (always) add a link to your site so we can look into this if need be,

thanks,
Ronald

Review the complete topic (launches new window)