Marketpress Product Images and Options

My client has a single leather beverage holder product and they desire multiple options on the product page so the customer can customize their beverage holder at the time of purchase.

These options include:

1) Leather Color (Timber Brown, Bison Brown, Red, Blue, Black)

2) Leather Color Refinements (lighter, distressed)

3) Preferred side of waist (right, left)

4) Rivet Style (silver @no additional price, others will incur incremental cost)

5) Button Snap Stype (silver @no additional price, others will incur incremental cost)

6) Lettering style choice (although their email is cryptic, I believe there are two)

7) Lettering color

8) And, as noted in this unresolved thread, they want to personalize the wording on each item in the cart. Link to thread: https://premium.wpmudev.org/forums/topic/need-field-for-engraving

Question 1

How do I add all these options to one product?

Question 2

How can a customer personalize EACH item in the cart?

Now that styling is finished, I’m also observing that there seems to be no way to upload multiple images for product thumbnails. Is this by design? Most shopping carts do permit multiple images for products that appear as thumbnails and popup when clicked for closer scrutiny.

My client wants to go live in two weeks from this post so these questions are urgent (to me). If there is no immediate solution and if detailed documentation is not available for writing these customizations, I will be forced to choose a non-WordPress Cart software that I know will do these things. I’d prefer to not go that route…

  • DavidM
    • DEV MAN’s Mascot

    Hi virtuallymarj,

    First off, apologies that we missed responding further on your prior thread. Really, it involves quite an extensive customization from what I see, as Aaron alluded to, not something we can really provide detailed documentation for.

    I’ll ask Aaron if he can maybe provide a bit of insight on that as I’m not really sure of the filters that could be used in this case.

    As for your first question, currently, the only way I could see that being done is to either include those items as Variations in MarketPress or create separate products with variations for each.

    Multiple images could possibly be done by adding a gallery into the product description. Have you considered that option?

    Cheers,

    David

  • virtuallymarj
    • Design Lord, Child of Thor

    Hi David,

    Thank you for your reply.

    Regarding the previously unresolved thread: I really am a “capable” developer and not so intimidated by customizations to plugins … so long as I know how to implement them without impeding upgrades and/or totally destroying my work at the time of an upgrade. In other words, the code cannot be fragile to upgrades. Thus, any insights that Aaron will provide, either here in this thread or in my private inbox at this site, will be very much appreciated. This feature is critical to the site’s success.

    Did I mention the client wants to go live in 2 weeks? :slight_smile:

    I was afraid that the answer would be multiple products but I *think* that I can spin it so that there is a distinct advantage to doing it this way without meeting too much resistance. I have that email saved as a draft right now, as a matter of fact.

    It does seem odd that this cart software does not permit multiple image uploads per product without having to introduce yet-another-plugin that may “break” down the road. I playing with gallery plugins that also popped up to a larger image this morning. Even though it is a highly functional and popular plugin, I don’t want to use NextGen because it has that silly JW Player ad screen embedded in the gallery which doesn’t look good. I wasn’t happy with several others that I tried for various reasons. Can you be so kind as to recommend one that you’ve used with this software in the past?

  • Aaron
    • CTO

    Unfortunately neither of those are current features and won’t be in added within 2 weeks.

    It would take major custom developement to add these if you have the skills. There are hooks in there you could use to extend MarketPress. Probably add a new metabox to add extra per product settings. For personalization you could print a form on the shipping form page and save it to the order details object. You would also probably need to hook into the single order management page to display this info.

    At the very least thats the general direction to go in.

  • virtuallymarj
    • Design Lord, Child of Thor

    There are hooks in there you could use to extend MarketPress. Probably add a new metabox to add extra per product settings. For personalization you could print a form on the shipping form page and save it to the order details object. You would also probably need to hook into the single order management page to display this info.

    Thanks for the information. When you do deliver this customization for personalization/engraving, is this the approach that you will be using?

    I want to be sure that what I’m delivering for my clients does not impede them from upgrades in the future so, if it is OK with you, I will be sharing my approach on this thread and waiting for feedback from you that my customization will not be making the code “fragile” when future upgrades are introduced.

  • Aaron
    • CTO

    WordPress hooks in MarketPress. Some useful examples for you:

    Add settings to details metabox:

    do_action( 'mp_details_metabox' );

    Save your settings fields to post meta:

    do_action( 'mp_save_product_meta', $post_id, $meta );

    To add your customization fields above shipping form:

    $content .= apply_filters( 'mp_checkout_before_shipping', '' );

    Save them to the session, preferably in $_SESSION array so it will be attached to order:

    do_action( 'mp_shipping_process' );

    Add a box to single order screen to display info:

    <?php do_action('mp_single_order_display_box', $order); ?>

  • virtuallymarj
    • Design Lord, Child of Thor

    Perhaps this is a testimony to my conspicuous lack of a life (smile) but I actually pored over the marketpress.php script last evening. It was very easy to follow what was happening. I would like to congratulate you for producing such well documented code. That is quite rare…

    Also, thank you for providing more cookie crumbs for me to hone in on.

  • virtuallymarj
    • Design Lord, Child of Thor

    I’m frustrated. All of your arrays seem to be named $this. I have no doubt that you’ve given me all the clues that I would need to have if I was going to add the several options fields that I listed when I opened this thread but that is not essential, even though it would thrill my clients.

    I could write this code under different circumstances but time is of the essence so I’ve negotiated with them to live with multiple products instead of having one product with 7 different options. Thus, at this time, I only need to add a personalization text field for each item in the cart PRIOR to checking out. The personalization must be attached to the order.

    From my study of the code, you are asking for a coupon code before checkout. How much trouble would it be for you to write a “patch” that allows us to add personalization to each item in the cart prior to checkout? In lieu of that patch, could you please give me specific instructions as to what I need to change to make this happen?

    Will future releases permit us to upload more than one product image per product and to have more than one options field?

  • Aaron
    • CTO

    $this is how you access properties in a php object.

    The hooks I gave you are for personalization. Basically what I would do is on the shipping form loop through the cart and check each product’s postmeta to see if they are personalizable, and print a field there you add to the shipping array.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.