Jump to content


Better, More Convenient, Private Support for Your iThemes Products Is Here.


We're moving support away from the forum and in to private tickets - Log In to Get Support Here


Note: any currently open support threads in the community forum will stay open while we resolve them.

Most Liked Content


#256346 Shortcode For Exchange?

Posted Ronald on 20 May 2014 - 04:00 PM

@webweaver,

I've worked out a way to add a "buy" button to a WordPress non exchange post or page via a shortcode. It is fairly experimental, some content is hard-coded, but if you want to give it a spin, please do. So this is not an official iThemes Exchange customisation yet.

The assumption is that you know the product ID, and that most other product information will be added in the post. So (currently) it only outputs description, price and the buy now button. In order for this to make sense, it is highly recommended that you add the superwidget to a sidebar, so that the checkout function can be initiated as well. Otherwise, the buy button would be kinda lost.

This is (as far as I'm concerned) still work in progress, but I'm curious to see how/if at all this works for you.

Add the following code at the end of your child theme's functions.php:

/**
* Creates a shortcode to add a product to the cart
*
*/
function my_it_exchange_add_to_cart($atts) {

   extract(shortcode_atts(array(
			"product_id" => null
   ), $atts));

   it_exchange_set_product( $product_id );

	$output = "<div class='my_it_itemdescription'>Item: " . it_exchange( 'product', 'get-description' ) . "</div>";
	$output .= "<div class='my_it_price'>Price: " . it_exchange( 'product', 'get-base-price' ) . "</div>";
	$output .= "<div class='my_it_buy-now'>" .it_exchange( 'product', 'get-purchase-options', array( 'add-to-cart-edit-quantity' => true, 'buy-now-edit-quantity' =>true ) ) . "</div>";

   return $output;
}
add_shortcode( 'add-to-cart', 'my_it_exchange_add_to_cart' );

Then add the following shortcode in your post or page:

[add-to-cart product_id=123]

where 123 is the (WordPress) ID of the product,

Ronald


#146000 Why I Admire Ithemes And Especially Webdesign.com

Posted mcfitz on 17 August 2012 - 11:30 PM

When I find something I like, I share it with others. I've had a lot of opportunities to talk about iThemes and WebDesign.com over the past few months, and the latest was this week at a local WordPress Meetup. These are a few of the things I told them.

I have been a member of WebDesign.com since last October, and it's been the best time and money I've spent in the past year. Each webinar is interesting and the topics are directly related to working in WordPress, not some out-of-touch designer's idea of what's important. The "Professor," Benjamin Bradley, is extremely knowledgeable and a great speaker. He has an incredible knack for knowing what we are about to ask next. His ability to move from beginner to expert level is super helpful, because we're quite a mixed group.

I like iThemes because Cory Miller and team are not just pushing iTheme products, but they are out to help members become better designers, better developers, and better business owners. Cory's presentations on entrepreneurs have been great, and the guest speakers he's invited have really added to the mix. I admire what he's done with the company and I respect his work ethic.

Builder and the child themes are super to work with. [I explained the difference between "frameworks," themes and child themes as best I could.] Although the child themes with Builder don't look as fancy as some other themes at the start, the ability to do ANYTHING YOU WANT with the theme is a huge advantage over a pretty but limited theme. I don't like working with any other theme brand now, after working with Builder, and that's a fact. (Plus, the new Allure themes are pretty to start with! LOL)

When I mentioned the fact that iThemes makes BackupBuddy, most of the Meetup members perked up. They recognized it and were interested in other Plugins made by the company. I made sure to mention Chris Jean and the development team a time or two, and to say how attentive they were to their customers.

The best part of all, I ended with, was the support. I have been very pleased with the support I've gotten from iThemes, and I want to especially recognize Sridhar Katakam for his patience, guidance, and the incredible amount of care and time he puts into the forums. When I see the answers from Ronald and Sridhar, I wonder how two men can possibly know so much about WordPress, Builder, plugins, and everything else. Please know that the users appreciate you tremendously, even if it isn't said as often is should be.

Thank you!


#281442 Limit Purchases To Only One Country?

Posted evita3 on 20 December 2014 - 07:06 PM

The filters you refer to are the 'alts'--synonyms that if entered will result in the same entry. This only makes sure if the client types anything close to the correct response that it will be accepted correctly. In my case for example (México) if you type in 'Mexico' it will not be found. With an alt, all variants are accepted.

Steve let me see if I can re-understand what hack I used to do the trick to limit ITE to one country.

If I am not mistaken, I took the output of what I wanted--country and state data in an entered form--and stuck it back into the appropriate templates. This bypasses the code and forcably inserts what would normally occur if one country were chosen.

------------

Create directories and make two files in:
<your_theme>/exchange/content-checkout/elements/purchase-requirements/shipping-address/elements

The first file, 'country.php', should have something like:

<?php
/**
* Limit to one country (US example)
*/
?>
<?php do_action( 'it_exchange_content_checkout_shipping_address_purchase_requirement_before_country_element' ); ?>
<div class="it-exchange-country it-exchange-left">
<label for="it-exchange-shipping-address-country">
	 <?php _e( 'Country', 'it-l10n-ithemes-exchange' ); ?>
	 <span class="it-exchange-required-star">
		 *
	 </span>
</label>
<select id="it-exchange-shipping-address-country" name="it-exchange-shipping-address-country">
	 <option value="US"><?php _e( 'United States', 'it-l10n-ithemes-exchange' ); ?></option>
</select>
</div>
<?php do_action( 'it_exchange_content_checkout_shipping_address_purchase_requirement_after_country_element' ); ?>


The second, 'states.php', can contain something like what comes from 'ithemes-exchange/api/data-sets':

<?php
/**
* div bug fix for 'state' field length, and hard coded for US states
*/
?>
<?php do_action( 'it_exchange_content_checkout_shipping_address_purchase_requirement_before_state_element' ); ?>
<div class="it-exchange-left it-exchange-clear-left">
<label for="it-exchange-shipping-address-state">
	 <?php _e( 'State', 'it-l10n-ithemes-exchange' ); ?>
	 <span class="it-exchange-required-star">*</span>
</label>
<select id="it-exchange-shipping-address-state" name="it-exchange-shipping-address-state">
<option value='AL'><?php _e( 'Alabama', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='AK'><?php _e( 'Alaska', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='AZ'><?php _e( 'Arizona', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='AR'><?php _e( 'Arkansas', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='CA'><?php _e( 'California', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='CO'><?php _e( 'Colorado', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='CT'><?php _e( 'Connecticut', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='DE'><?php _e( 'Delaware', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='DC'><?php _e( 'District Of Columbia', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='FL'><?php _e( 'Florida', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='GA'><?php _e( 'Georgia', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='HI'><?php _e( 'Hawaii', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='ID'><?php _e( 'Idaho', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='IL'><?php _e( 'Illinois', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='IN'><?php _e( 'Indiana', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='IA'><?php _e( 'Iowa', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='KS'><?php _e( 'Kansas', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='KY'><?php _e( 'Kentucky', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='LA'><?php _e( 'Louisiana', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='ME'><?php _e( 'Maine', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MD'><?php _e( 'Maryland', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MA'><?php _e( 'Massachusetts', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MI'><?php _e( 'Michigan', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MN'><?php _e( 'Minnesota', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MS'><?php _e( 'Mississippi', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MO'><?php _e( 'Missouri', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='MT'><?php _e( 'Montana', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NE'><?php _e( 'Nebraska', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NV'><?php _e( 'Nevada', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NH'><?php _e( 'New Hampshire', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NJ'><?php _e( 'New Jersey', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NM'><?php _e( 'New Mexico', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NY'><?php _e( 'New York', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='NC'><?php _e( 'North Carolina', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='ND'><?php _e( 'North Dakota', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='OH'><?php _e( 'Ohio', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='OK'><?php _e( 'Oklahoma', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='OR'><?php _e( 'Oregon', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='PA'><?php _e( 'Pennsylvania', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='RI'><?php _e( 'Rhode Island', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='SC'><?php _e( 'South Carolina', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='SD'><?php _e( 'South Dakota', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='TN'><?php _e( 'Tennessee', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='TX'><?php _e( 'Texas', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='UT'><?php _e( 'Utah', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='VT'><?php _e( 'Vermont', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='VA'><?php _e( 'Virginia', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='WA'><?php _e( 'Washington', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='WV'><?php _e( 'West Virginia', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='WI'><?php _e( 'Wisconsin', 'it-l10n-ithemes-exchange' ) ?></option>
<option value='WY'><?php _e( 'Wyoming', 'it-l10n-ithemes-exchange' ) ?></option>
</select>
</div>
<?php do_action( 'it_exchange_content_checkout_shipping_address_purchase_requirement_after_state_element' ); ?>

---------------------

With the coutry preselected and states loaded, there is no need to show the country field. Include this such as in your theme 'style.css' file or one specific to ITE '<your_theme>/exchange/style.css', or in a Builder stylesheet assiged to your checkout page, and best wishes:

.it-exchange-city {
width: 95% !important;
}
.it-exchange-country {
display: none;
}
.it-exchange-state {
width: 67%;
}


--------------
NEW NOTE: The above code used to work, but for some reason as of 12/17/15 I cannot get it to automatically select the country. As country is required first before states can be selected, one can't simply hide the country field. This means that iThemes Exchange cannot be used for just one country.
--------------


#263175 Any Progress Toward Being Able To Email Customers?

Posted pattyayers on 24 July 2014 - 11:06 AM

Thanks, Elise. The MailChimp add-on only allows people to opt in if they want, so meets a completely different need. We need to be able to email all of our customers. We'll add them to a list manually for now, but really hoping this gets some attention soon, email being such a basic aspect of e-commerce.


#259378 Shortcode For Exchange?

Posted mrarlen on 18 June 2014 - 02:41 PM

Building on Ronald's code, Here's what I came up with so far. Although I am very new at working with this API.  

This adds a Featured Thumbnail Image, Product Title and basic tags which can be styled.  

/*
* Creates a shortcode to add a product to the cart
*
*/
function my_it_exchange_add_to_cart($atts) {
   extract(shortcode_atts(array(
						"product_id" => null
   ), $atts));
   it_exchange_set_product( $product_id );
	 $output = "<div class='my_it_product_shortcode'><div class='my_it_itemimage'>" . it_exchange( 'product', 'featured-image', array( 'size' => 'thumbnail', 'return' => 'true' ) ) . "</div>";
		$output .= "<div class='my_it_itemdtitle'><h2>" . it_exchange( 'product', 'get-title' ) . "</h2></div>";
		$output .= "<div class='my_it_itemdescription'><b>Description: </b> " . it_exchange( 'product', 'get-description' ) . "</div>";
		$output .= "<div class='my_it_price'>Price: " . it_exchange( 'product', 'get-base-price' ) . "</div>";
		$output .= "<div class='my_it_buy-now'>" .it_exchange( 'product', 'get-purchase-options', array( 'add-to-cart-edit-quantity' => true, 'buy-now-edit-quantity' =>true ) ) . "</div></div>";
   return $output;
}
add_shortcode( 'add-to-cart', 'my_it_exchange_add_to_cart' );



#255944 Shortcode For Exchange?

Posted webweaver on 16 May 2014 - 10:21 AM

shortcodes for individual products to be placed on non-shop page would be awesome!


#246894 Add Billing Address To User Profile

Posted ironbound on 12 March 2014 - 08:49 PM

Hi Guys,

It'd be great if you could add the billing address automatically to the user's profile on the back end.

Cheers,

Timothy


#240654 Login Landing Page

Posted tsetford on 30 January 2014 - 10:18 PM

Sorry, first line got messed up, should be:
'redirect' => it_exchange_in_superwidget() ? it_exchange_clean_query_args() : it_exchange_get_page_url( 'profile' ),



#225330 Gravity Forms And Exchange

Posted tugmariner on 29 October 2013 - 01:41 PM

In case anyone else needs it:

//add to cart
add_action("gform_after_submission", "custom_gf_hook_after_submission", 10, 2);
function custom_gf_hook_after_submission ($entry, $form) {
//convert to named array
$vals= array();
foreach($form['fields'] as $f) {
  if(!is_array($f['inputs'])) {
   $vals[$f['label']]=$entry[$f['id']];
   continue;
  }
  //complex type
  foreach($f['inputs'] as $i)
   $vals[$i['label']]=$entry[$i['id']];
}
// use labels to access fields
if(@$vals['Product ID'] AND $vals['Quantity']) {
  it_exchange_empty_shopping_cart();
  it_exchange_add_product_to_shopping_cart($vals['Product ID'],$vals['Quantity']);
}
}



#197317 Hope You Guys Are Safe!

Posted superdoc on 20 May 2013 - 03:37 PM

This is Mark Klinefelter, member in Miami, FL  I just hope the ithemes group is safe and sound after the
tornado activity in Ok. City.  Buildings can always get replaced but hope all the people in your area are
safe.  South Florida has its' turn coming up on hurricane season starting June1.

Mark


#113425 My Builder Sites

Posted ka2id on 22 February 2012 - 06:08 PM

I have been using WordPress now for about a year and a half and Builder for most of that time, as someone who doesn't code PHP much, I love how Builder gives me a quick and easy way to layout my sites.

So a lot of these sites don't look like typical Builder sites because I use Builder mainly as a skeleton for the layout, then I CSS the heck out of it and do all custom graphics. Enjoy!

http://broadwaycrossing.ca/
New condo development in Vancouver, just using the base Builder theme

http://sunriseliving.ca/
Condo development  site

http://realestaterebel.ca/
Realtor's website, using the Covert theme

http://barbierienterprises.com/
Website for building maintenance/renovation company, using base Builder theme

http://www.reliefrxstaffing.com/
Relief Pharmacy worker job site, used Builder and WPJobBoard plugin, love how one can incorporate other major themes with Builder

http://ka2id.com
My own website, also done using Builder

Really loving Builder and WordPress, using it for some other cool site concepts that I will load here soon, so thanks for the amazing plugin Ithemes and let me know what you guys think!


#286424 Need Phone Number And Email On Purchase Notifications

Posted Ronald on 10 February 2015 - 03:28 PM

Hi Cynthia,

indeed, this will add additional info to the WordPress dashboard, not the e-mail. I had a closer look, and if you add the following to the functions.php (and also add the first 2 functions as described above):

function my_phone_shortcode( $return, $atts, $content, $data ) {

	$transaction_id = $data[1]->transaction_id;

	$cart_object = get_post_meta( $transaction_id, '_it_exchange_cart_object', true );

	if( !empty( $cart_object->billing_address['phone'] ) ) {
		$return = $cart_object->billing_address['phone'];
	}
	
	 return $return;

}
add_filter( 'it_exchange_email_notification_shortcode_phone', 'my_phone_shortcode', 10, 4 );

function my_company_name_shortcode( $return, $atts, $content, $data ) {

	$transaction_id = $data[1]->transaction_id;

	$cart_object = get_post_meta( $transaction_id, '_it_exchange_cart_object', true );

	if( !empty( $cart_object->billing_address['company-name'] ) ) {
		$return = $cart_object->billing_address['company-name'];
	}
	
	 return $return;
}
add_filter( 'it_exchange_email_notification_shortcode_company_name', 'my_company_name_shortcode', 10, 4 );

function my_email_shortcode( $return, $atts, $content, $data ) {

	if( !empty( $data[1]->user->data->user_email ) ) {
		$return = $data[1]->user->data->user_email;
	}
	
	 return $return;
}
add_filter( 'it_exchange_email_notification_shortcode_email', 'my_email_shortcode', 10, 4 );

you should be able to use the shortcodes:
[it_exchange_email show=phone]
[it_exchange_email show=email]
and
[it_exchange_email show=company_name] (just included that for consistency and for others that may stumble upon this topic).

in the e-mail template.

let us know if that helps,
Ronald


#279445 Stripe Webhook Errors After Upgrade To 1.1.33

Posted Elise Alley on 02 December 2014 - 09:18 AM

Hi mjsdiaz,

Can you send us your site URL so we can take a look?  Can we also go ahead and get admin log in credentials?  You can email the information to me at elise@ithemes.com or PM it to me here on the forum.  Just be sure to include a link to this thread so I know what the message is in regards to.  

Also, can you let us know what version of Exchange you're currently running?  And, do you have iThemes Security installed on your site?  

Thanks,

Elise


#273961 Can The 'zip' And 'state' Fields In Shipping Address Be Made...

Posted danielledarnell on 12 October 2014 - 01:20 PM

Hi Elise,

Could you help me with replacing the country field with a hidden field with a set value.  We don't ship outside the United States at this time, so I'd like to set the field to US and then hide it from the form.  Could you explain how to do this?

Thanks!
Danielle


#258994 Exchange Update Has Broken Site Again!

Posted Glenn Ansley on 13 June 2014 - 03:30 PM

It was an issue with hosts running PHP 5.3 or lower. I changed the syntax to work with that though.


#245194 Ui Bug: Exchange Add Membership Div/css Collision...

Posted Elise Alley on 28 February 2014 - 10:26 AM

Hi WP,

Exchange isn't (and never has been) in your iThemes Dashboard.  It is only available from the WordPress Plugin Repository.  

Since Exchange is only available on the WordPress Repo, there is no license, which could be why you were seeing an update available for Exchange, but not the others.  Have you licensed the Membership and Recurring Payment plugins on your site?  I didn't have any issue updating, nor have I had any reports from anyone else about having problems updating.  So check to make sure that they're licensed

Here are the screenshots for you:

Advanced Options.png

Advanced Options 2.png

Thanks,

Elise


#238863 Login/logout Page Bug/conflict With Custom Menus

Posted Glenn Ansley on 20 January 2014 - 01:47 PM

Hi Kerry,
Thanks for your detailed explanations. I was able to reproduce your problem and find a solution. It will be fixed in the next release of Exchange.


#222299 Exchange: Recurring And One-Time Donations

Posted ctabor1 on 05 October 2013 - 09:26 AM

I've done a quick search here, and there are only a few posts on recurring donations or payments, but were not what I was looking for.

I see you have quite a few video tutorials on Exchange, and I went back and did a quick review of the Exchange webby in the last Developer course, but don't think it was really addressed... maybe just mentioned that you could do it. SO, looking for instructions, if any exist. (and options, etc.)

Actually -- I finally purchased Gravity Forms for various reasons... and one of them being able to do recurring donations for a non profit.
However, when it was stated that exchange could do this... I may like to do this instead, since I want to set up various donation options for my client's non profit.

Could you advise best way to:

MAIN OBJECTIVE:
Showcase 3-4 different funds to donate to (same non profit)  (e.g. General Fund, Strands Fund, UltraSound Fund, etc.)
Offer a 1-time donation option  - but offer and encourage monthly recurring donation to fund(s) of their choice.
These would be ongoing so could stay on the site.

ADDITIONAL OBJECTIVE:
Alternately, for a special "benefit event" or fundraiser... would love to be able to show "how much raised" as the commitments come in.
Should we stick with a fundraiser plug in for something like that?  These would be time sensitive and not remain on the site indefinitely.

Thanks for your feedback ahead of time...:)
Christine


#197318 Hope You Guys Are Safe!

Posted Elise Alley on 20 May 2013 - 03:44 PM

Hey Mark,

All the iThemes employees are safe and sound.  The office is North of all the devastation, so we were all together and safe.  Our thoughts and prayers are with all those in that area, just as they'll be with you during hurricane season as well!

Thanks so much for checking in on us!  We greatly appreciate it!

Thanks,

Elise


#107907 A Couple Of New Sites

Posted bhte on 27 January 2012 - 08:39 AM

Here's a site based on Americana, with the Church nav bar:

http://forourdaughters.co.uk/ (it's got some very heavy subject matter)

And here's a site I built using the Default template from scratch:

http://www.bht-itsolutions.co.uk/

I love Builder and will be using it for all future web development. :)


Better, More Convenient, Private Support for Your iThemes Products Is Here.


We're moving support away from the forum and in to private tickets - Log In to Get Support Here


Note: any currently open support threads in the community forum will stay open while we resolve them.