Commit cc1df578 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
  
# How To Use WordPress for E-Commerce, by George Plumley
  
[![How To Use WordPress for E-Commerce, by George Plumley](http://akamaicovers.oreilly.com/images/9781771370547/cat.gif)](https://www.safaribooksonline.com/library/view/title/9781771370547//)
  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.
+7 −0
Changes for Working Files/Chapter 1/No Work Files.rtf: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\fs24 \cf0 No work files for this lesson...}
 No newline at end of file
+7 −0
Changes for Working Files/Chapter 2/No Work Files.rtf: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\fs24 \cf0 No work files for this lesson...}
 No newline at end of file
+140 −0
Changes for Working Files/Chapter 3/category-10.php: 140 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

/**

 * The template for displaying Store Category Archive pages.

 *

 * @package WordPress

 * @subpackage Twenty_Eleven

 * @since Twenty Eleven 1.0

 */



get_header(); ?>



		<section id="primary">

			<div id="content" role="main">



			<?php if ( have_posts() ) : ?>



				<header class="page-header">

					<h1 class="page-title"><?php

						printf( __( 'Category Archives: %s', 'twentyeleven' ), ' <span>' . single_cat_title( '', false ) . '</span>' );

					?></h1>



					<?php

						$category_description = category_description();

						if ( ! empty( $category_description ) )

							echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );

					?>

				</header>



				<?php twentyeleven_content_nav( 'nav-above' ); ?>



				<?php /* Start the Loop */ ?>

				<?php while ( have_posts() ) : the_post(); ?>

<?php $post_meta_data = get_post_custom($post->ID); ?>

<div class="product-box">

<?php if ( has_post_thumbnail() ) : print '<div class="photo">' . the_post_thumbnail('medium') . '</div>'; endif; ?>

<div class="product-info">

	<h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
	
	<?php if ( !empty($post_meta_data['product_price'][0]) ) : echo "<div class=\"price\">" . $post_meta_data['product_price'][0] . "</div>"; endif; ?>

	<?php if ( !empty($post_meta_data['product_description'][0]) ) : echo "<div class=\"description\">" . $post_meta_data['product_description'][0] . "</div>"; endif; ?>
	
	<?php if ( !empty($post_meta_data['product_features'][0]) ) : echo "<div class=\"features\"><ul>" . $post_meta_data['product_features'][0] . "</ul></div>"; endif; ?>
	
	<?php if ( !empty($post_meta_data['product_material'][0]) ) : echo "<div class=\"material\">" . $post_meta_data['product_material'][0] . "</div>"; endif; ?>
	
	<?php if ( !empty($post_meta_data['product_model'][0]) ) : echo "<div class=\"model\">" . $post_meta_data['product_model'][0] . "</div>"; endif; ?>
	
	<?php if ( !empty($post_meta_data['product_paypal'][0]) ) : echo "<div class=\"paypal\">" . $post_meta_data['product_paypal'][0] . "</div>"; endif; ?>

</div>

</div>




				<?php endwhile; ?>



				<?php twentyeleven_content_nav( 'nav-below' ); ?>



			<?php else : ?>



				<article id="post-0" class="post no-results not-found">
					<header class="entry-header">

						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>

					</header><!-- .entry-header -->



					<div class="entry-content">

						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>

						<?php get_search_form(); ?>

					</div><!-- .entry-content -->

				</article><!-- #post-0 -->



			<?php endif; ?>



			</div><!-- #content -->

		</section><!-- #primary -->



<?php get_sidebar(); ?>

<?php get_footer(); ?>
+68 −0
Changes for Working Files/Chapter 3/sample-div-structure-for-display.txt: 68 added lines, 0 removed lines.
Original line number Diff line number Diff line




<div class="product-info">

<div class="description">This is the descriptive text for the product, where you would describe its benefits such as how it will make your cooking time faster or cleanup easier.</div>

<div class="features"><ul>
<li>Safe for dishwasher, oven, and microwave</li>
<li>Easy to clean enamel-glaze finish</li>
<li>Does not absorb odours</li>
</ul></div>

<div class="material">High-fired stoneware</div>

<div class="model">Model No: D-8273</div>

<div class="price">Only $15.00</div>

INSERT PAYPAL BUTTON HERE

</div>








example CSS for the structure

div.product-info {
    float: right;
    width: 240px;
}

.price {
	font-size: 22px;
	font-weight: bold;
	color: #AF3619;
}

.features {
	padding: 10px;
	border: 1px solid #a6a6a6;
        border-bottom: 0px;
	background: #fafafa;
	margin-bottom: 15px;
}

div.features {
	padding: 10px;
	border: 1px solid #a6a6a6;
	background: #fafafa;
	margin-bottom: 15px;
}

.material {
	font-style: italic;
	font-size: 18px;
	font-weight: bold;
}

.model {
	font-size: 10px;
}
Loading