Title: request: order on same page
Last modified: August 22, 2016

---

# request: order on same page

 *  Resolved [SaladGoat](https://wordpress.org/support/users/saladgoat/)
 * (@saladgoat)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/request-order-on-same-page/)
 * On the Store page, customers can scroll down and down and down and go crazy, 
   Adding everything to their Cart. Impulse buying, yay!
 * But if a product has variations, they are instead presented with a Choose Option
   button, which takes them off the Store page to the individual product page. Now
   maybe they forget to go back to the Store.
 * Is there a way to add the Options dropdown box onto the Store page please? Then
   they can make their choice and keep scrolling and finding other things they didn’t
   know they needed. 😉
 * Please and thank you. 🙂
 * [https://wordpress.org/plugins/wordpress-ecommerce/](https://wordpress.org/plugins/wordpress-ecommerce/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/request-order-on-same-page/#post-5508442)
 * Hi [@saladgoat](https://wordpress.org/support/users/saladgoat/),
 * I hope you are well today and thank you for your question.
 * To achieve this create a file functions.php in your WordPress directory wp-content/
   [mu-plugins](http://codex.wordpress.org/Must_Use_Plugins)( Create it if not exist)
   containing the following code.
 *     ```
       <?php
   
       if (!function_exists('_mp_products_html_grid')) :
       function _mp_products_html_grid( $custom_query ) {
   
       		global $mp,$post;
       		$html = '';
       		$current_post = $post;
   
       		//get image width
       		if ($mp->get_setting('list_img_size') == 'custom') {
       				$width = $mp->get_setting('list_img_width');
       		} else {
       				$size = $mp->get_setting('list_img_size');
       				$width = get_option($size . "_size_w");
       		}
   
       		$inline_style = !( $mp->get_setting('store_theme') == 'none' || current_theme_supports('mp_style') );
   
       		while ( $custom_query->have_posts() ) : $custom_query->the_post();
       			$img = mp_product_image(false, 'list', $post->ID);
       			$excerpt = $mp->get_setting('show_excerpt') ?
       							'<p class="mp_excerpt">' . $mp->product_excerpt($post->post_excerpt, $post->post_content, $post->ID, '') . '</p>' :
       							'';
       			$mp_product_list_content = apply_filters('mp_product_list_content', $excerpt, $post->ID);
   
       			$pinit = mp_pinit_button($post->ID, 'all_view');
   
       			$class = array();
       			$class[] = strlen($img) > 0 ? 'mp_thumbnail' : '';
       			$class[] = strlen($excerpt) > 0 ? 'mp_excerpt' : '';
       			$class[] = mp_has_variations($post->ID) ? 'mp_price_variations' : '';
       			$context = mp_has_variations($post->ID) ? 'single' : 'list';
       			$html .= '
       				<div itemscope itemtype="http://schema.org/Product" class="hentry mp_one_tile ' . implode($class, ' ') . '">
       					<div class="mp_one_product"' . ($inline_style ? ' style="width: ' . $width . 'px;"' : '') . '>
       						<div class="mp_product_detail"' . ($inline_style ? ' style="width: ' . $width . 'px;"' : '') . '>
       							' . $img . '
       							' . $pinit .'
       							<h3 class="mp_product_name entry-title" itemprop="name">
       								<a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a>
       							</h3>
   
       							<div>' . $mp_product_list_content . '</div>
       						</div>
   
       						<div class="mp_price_buy"' . ($inline_style ? ' style="width: ' . $width . 'px;"' : '') . '>
       							' . mp_product_price(false, $post->ID) . '
       							' . mp_buy_button(false, $context, $post->ID) . '
       							' . apply_filters('mp_product_list_meta', '', $post->ID) . '
       						</div>
   
       						<div style="display:none" >
       							<span class="entry-title">' . get_the_title() . '</span> was last modified:
       							<time class="updated">' . get_the_time('Y-m-d\TG:i') . '</time> by
       							<span class="author vcard"><span class="fn">' . get_the_author_meta('display_name') . '</span></span>
       						</div>
       					</div>
       				</div>';
       		endwhile;
   
       		$html .= ($custom_query->found_posts > 0) ? '<div class="clear"></div>' : '';
   
       		$post = $current_post; //wp_reset_postdata() doesn't work here for some reason
   
       		return apply_filters('_mp_products_html_grid', $html, $custom_query);
       }
       endif;
   
       if (!function_exists('_mp_products_html_list')) :
       function _mp_products_html_list( $custom_query ) {
       		global $mp,$post;
       		$html = '';
       		$total = $custom_query->post_count;
       		$count = 0;
       		$current_post = $post;
   
       		while ( $custom_query->have_posts() ) : $custom_query->the_post();
       				$count = $custom_query->current_post + 1;
   
       				//add last css class for styling grids
       				if ($count == $total)
       						$class = array('mp_product', 'last-product', 'hentry');
       				else
       						$class = array('mp_product', 'hentry');
   
       				$html .= '
       					<div itemscope itemtype="http://schema.org/Product" ' . mp_product_class(false, $class, $post->ID) . '>
       						<h3 class="mp_product_name entry-title"><a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></h3>
       						<div class="entry-content">
       							<div class="mp_product_content">';
   
       				$product_content = mp_product_image(false, 'list', $post->ID);
       				if ( $mp->get_setting('show_excerpt') ) {
       					$product_content .= $mp->product_excerpt($post->post_excerpt, $post->post_content, $post->ID);
       				}
   
       				$html .= apply_filters('mp_product_list_content', $product_content, $post->ID);
       				$html .= mp_pinit_button($post->ID,'all_view');
       				$html .= '
       							</div>
       							<div class="mp_product_meta">';
   
       				$context = mp_has_variations($post->ID) ? 'single' : 'list';
       				//price
       				$meta = mp_product_price(false, $post->ID);
       				//button
       				$meta .= mp_buy_button(false, $context, $post->ID);
       				$html .= apply_filters('mp_product_list_meta', $meta, $post->ID);
       				$html .= '
       							</div>
       						</div>
       						<div style="display:none">
       							<time class="updated">' . get_the_time('Y-m-d\TG:i') . '</time> by
       							<span class="author vcard"><span class="fn">' . get_the_author_meta('display_name') . '</span></span>
       						</div>
       					</div>';
       		endwhile;
   
       		$post = $current_post; //wp_reset_postdata() doesn't work here for some reason
   
       		return apply_filters('_mp_products_html_list', $html, $custom_query);
       }
       endif;
       ```
   
 * Best Regards,
    WPMU DEV
 *  Thread Starter [SaladGoat](https://wordpress.org/support/users/saladgoat/)
 * (@saladgoat)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/request-order-on-same-page/#post-5508444)
 * Works great – thanks!
 *  Plugin Support [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/request-order-on-same-page/#post-5508458)
 * You are most welcome, if i can be of any further assistance please don’t hesitate
   to ask 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘request: order on same page’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-ecommerce_f7d96b.svg)
 * [MarketPress - WordPress eCommerce](https://wordpress.org/plugins/wordpress-ecommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-ecommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-ecommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-ecommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-ecommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-ecommerce/reviews/)

## Tags

 * [variations](https://wordpress.org/support/topic-tag/variations/)

 * 3 replies
 * 2 participants
 * Last reply from: [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/request-order-on-same-page/#post-5508458)
 * Status: resolved