Marketpress Product Selection Page

This is actually regarding Marketpress, but I didn't see that listed above. Is it possible to configure a "Forms" based product selection page that would allow a user to just check the items them want, have it added up and then check out from there? See attached form as an example of what I'm trying to accomplish on this site.

  • Jack Kitterhing

    Hi there @dave,

    Hope you're well today! :slight_smile:

    I definitely see a use for this, while it's not currently possible out of the box, it would make a interesting addition.

    Currently it's only cart based, add to cart checkout, or disable the cart and link the buttons through to a different link.

    It would be possible with custom coding, you could try posting on our jobs board here https://premium.wpmudev.org/wordpress-development/

    Alternatively, you could try using a forms plugin, such as Gravity forms or Formidable Pro. :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • dave

    Thanks Jack!

    I appreciate the quick response you all give. I suspected that was the case. I'm sure we can do the forms route.

    One related question - it seems to me that I can approximate what I'm looking for by using Add to Cart for each product in the Product list page but then the limitation would be that I don't see a way to do a Quantity selection in the Product List. Is there a way to select Quantity on this page (as drawn in on the attachment) so that i can be adjusted at the time it's added rather than the cart itself? The site will be used by senior citizens so we need to keep it as simple as possible.
    Thanks again
    Dave

  • Vinod Dalvi

    Hi Dave,

    Thank you for your reply.

    You can display the quantity field on the product listings page by creating a file functions.php and adding the following code in it then add the created file in the directory wp-content/mu-plugins( create it if not exist ). Find more information about mu-plugins here http://codex.wordpress.org/Must_Use_Plugins

    <?php
    
    if(! class_exists('Marketpress_Quantity_Filed') ):
    
    class Marketpress_Quantity_Filed{
    
    	function __construct(){
    
            add_filter('mp_buy_button_tag', array($this, 'add_quantity_field'), 10, 3);
        }
    
        public function add_quantity_field( $button, $post_id, $context ) {
            //Check if this is teh list view to avoid rendering the field twice in single view.
            if('list' !== $context){
                return $button;
            }
            //Define Quantity input field.
            $qty_tag = '<span class="mp_quantity"><label>' . __('Quantity:', 'mp') . ' <input class="mp_quantity_field" type="text" size="1" name="quantity" value="1" /></label></span>&nbsp;';
            //Insert the Quantity field at the beginning of button form.
            $new_button = substr_replace($button, $qty_tag, strpos($button, '<input'), 0);
    
            return $new_button;
        }
    }
    
    new Marketpress_Quantity_Filed;
    
    endif;

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.