Jump to content


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%;
}



#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!


#297364 Exchange For Handling Users Registration/ Login + Collecting Data

Posted Elise Alley on 20 May 2015 - 09:22 AM

Hi Nuno,

In order to become a member, a customer must go through the purchase process, even if the membership is a free product.  Registering on the site does not automatically make them a member.  

The customer can register through the Super Widget, but only during the purchase process.  Otherwise, they would need to go to the actual registration page.  Again, registering does not make them members and they would not have access to the restricted content until they purchased the membership product.  

For the fatal error - can you please provide us with the error message you receive?  Have you tried testing for a plugin or a theme conflict?  

Thanks,

Elise


#294993 How To Add Facebook Audience Pixel To The Store Page And Product Page

Posted Ronald on 30 April 2015 - 05:15 AM

Hi Michael,

I just added this to the Codex: http://ithemes.com/codex/page/Exchange_Code_Snippets#Conditional_check_for_Exchange_pages

that may help,
Ronald


#294790 Aws Ec2 Amazon Linux And Stripe Add-On In Wordpress 4.2

Posted Elise Alley on 28 April 2015 - 03:32 PM

Hi Masaaki,

Have you check to insure that the mbstring extension was enabled?  I spoke with the developer about this issue and he said that he'd run into a similar issue in the past after he updated PHP; it didn't enabled it by default in php-fpm, it was only enabled in php-cli.

Please double check that this was enabled and let us know what you find.  

Thanks,

Elise


#294352 Product Description Type Size - Exchange

Posted Elise Alley on 24 April 2015 - 09:20 AM

Hi Ryan,

You can adjust the size of your product titles using the following code:

#it-exchange-store .it-exchange-product-title {
  font-size: 1em;
}

You can, of course, adjust the size further, but that should give you a good starting point.  You don't want to edit Exchange directly as any time you update Exchange, it will overwrite your changes.  Instead, you'll want to follow the directions here:  http://ithemes.com/codex/page/Exchange_FAQs:_How_Do_I_Create_Custom_Styles_for_Exchange

There isn't currently an option to add the payment buttons to the store page.  This is a feature request which you can vote for on the Exchange Roadmap, but I don't have a timeline for if/when this will happen.  

Let us know if you have any additional questions.  

Thanks,

Elise


#289780 Change "guest Checkout" Text/label?

Posted Glenn Ansley on 16 March 2015 - 09:21 AM

Hi Mitchy,
We will have the ability for you to customize (or remove) heading text and button text in the next release of Exchange.

If you're comfortable with PHP and diffs, you can see our changes in the dev branch here: https://bitbucket.org/ithemes/ithemes-exchange/commits/544f41f113b83e346a2882648393bb9a33cdf8f7

Just remember that dev code hasn't been thoroughly tested until we release it.

Glenn


#289043 Product Images In Search

Posted DavidGW on 09 March 2015 - 03:59 PM

Figured this out so sharing the solution in case someone else has issues with this:

After <?php the_post(); ?> in the search.php loop and in the featured image section of the search page:
<?php it_exchange_set_product( $post->ID ); ?>
	
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- title, meta, and date info -->
<a href="<?php the_permalink(); ?>"><?php it_exchange( 'product', 'featured-image', array( 'size' => 'large' ) ); ?></a>
<?php if ( has_post_thumbnail() && !it_exchange( 'product', 'has-images' ) ) : ?>
<div class="it-featured-image">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'index_thumbnail', array( 'class' => 'index-thumbnail' ) ); ?></a>
</div>	 
<?php endif; ?>

Others might not need the conditional for whether or not the product has an image within the has_post_thumbnail, but since some of my products had post thumbnails on import, this kept me from having two images on some products in the search.


#289027 On Shop Page, Link Thumbnail To Large Image

Posted Ronald on 09 March 2015 - 03:17 PM

Hi,

one way to do this is to get the image thumbnail and large image url. The basis from this code comes from the ithemes-exchange/api/theme/product.php file, which is the file that handles all the "it_exchange" requests for "product".

The following code should show the image thumbnail, and link to the large image. Regarding the lightbox, I assume that you need to add classes that are required by the lightbox code:

<?php
$featured_image_thumbnail = wp_get_attachment_thumb_url( it_exchange_get_product_feature( $GLOBALS['it_exchange']['product']->ID, 'product-images' )[0] );
$featured_image_large = wp_get_attachment_url( it_exchange_get_product_feature( $GLOBALS['it_exchange']['product']->ID, 'product-images' )[0] );
if ( $featured_image_thumbnail ) {
		echo "<a href='" . $featured_image_large . "'><img src='" . $featured_image_thumbnail . "' /></a>";
}
?>

hope that helps,
Ronald


#288859 Using Pods To Show Random Product (Exchange)

Posted Ronald on 08 March 2015 - 11:02 AM

Hi,

to show the featured image of a product, you can use code such as:

$featured_image = wp_get_attachment_url( it_exchange_get_product_feature( $GLOBALS['it_exchange']['product']->ID, 'product-images' )[0] );
if ($featured_image) {
	echo "<img src='" . $featured_image . "' />";
}

Ronald


#288813 Product Category Widget

Posted Elise Alley on 06 March 2015 - 05:57 PM

Hi dweuste,

There isn't a setting that you've missed or anything.  It just looks like this is a bug.  I'll report this to the developers so they can look into it.  I don't have a timeline for when this will be addressed however.

Let us know if you have any additional questions.  

Thanks,

Elise