Marketpress Add New Product Addition Options not needed (color, related products, cross-selling)

Marketpress > Multisite > Fullwidth Theme

New Product for shop owner section

I am using Plugin > UB;
which is wonderful for a fast css edit of the back end.

I'm trying to get rid of: Related Products, Custom Colors, Cross-selling.

I've been looking at the source code to try and figure it out.....but....no luck....

THESE CODES are NOT working:
.relatad_products_id_metabox {display:none;}
.mp_product_link_div { display: none; }
.mp_product_variations_table { display: none; }

Any ideas? How can I fix this? Thanks.

I sorted EXTERNAL LINK with this awesome thread... https://premium.wpmudev.org/forums/topic/remove-external-link

  • veggie
    • Site Builder, Child of Zeus

    In Addition on the User Profile Page. I'd like to hid these options as well.

    VISUAL EDITOR & KEYBOARD SHORTCUTS

    attempting many variations of: (with no luck)

    .contextual-help-tabs-wrap .rich_editing { display: none; }
    .contextual-help-tabs-wrap .comment_shortcuts { display: none; }

  • Patrick
    • Support Monkey

    Hi there @veggie

    I hope you are well today!

    While I don't have the FullWidth theme, I do have the Pro theme by the same author. So I think it's safe to say they would be similarly coded.

    The reason is likely because you are identifying container classes instead of IDs.

    If you look closely at each of those containers with your browser's developer tools, you'll see that you should be specifying the IDs, not classes (screenshot).

    Try changing the selectors in your CSS to this for example:
    #relatad_products_id_metabox

  • veggie
    • Site Builder, Child of Zeus

    @Patrick Cohen My new favorite person! I'm trying to understand what all of that means but.... THANKS :slight_smile:

    entering this in the custom CSS in UB plugin: solved me problems

    #relatad_products_id_metabox { display: none; }
    #post_custom_color_metabox { display: none; }
    #cross_selling_metabox { display: none; }

  • Patrick
    • Support Monkey

    @veggie

    Yay! I like being the favorite, lol. :slight_smile:

    You can save a few bits of bandwidth too by including all selectors that inherit the same rules in the same declaration, like so:
    #relatad_products_id_metabox, #post_custom_color_metabox, #cross_selling_metabox { display: none; }

    Have fun!

  • veggie
    • Site Builder, Child of Zeus

    @Patrick Cohen Thanks!
    Another question here.... it seems these want a different type of code to hide them...

    Force Login, Product Listings Only, and Google an. I don't want my users to have these options.

    Ive been experimenting but haven't figured out which code to use yet.

  • veggie
    • Site Builder, Child of Zeus

    @Patrick Cohen and finally!

    I cannot for the life of me figure out how to hide (sandbox mode) I want it to just have the option on live. This could be really confusing for users. I have moved the site into functioning with my live paypal app already but this sandbox option still exists?

  • veggie
    • Site Builder, Child of Zeus

    @Patrick Cohen Also now trying to hid tags. As I realized with all the users and there is not easy way to limit what they can enter. I will go without for the launch of the site.

    #tagsdiv,#tagsdivsb,#tagsdiv-post_tag these codes aren't working.

  • Patrick
    • Support Monkey

    @veggie

    Whoops, forgot about this thread.

    Hiding Force Login, Product Listings Only, etc could be done with CSS if those table rows or data cells had specific IDs or classes, but they do not.

    Unfortunately, you can't hide selectbox options with CSS if they don't have any specific classes or IDs. You could probably do that with jQuery, but I would need some more experienced coders for help with that bit.

    Perhaps @Hoang Ngo could tackle this one?

  • Hoang Ngo
    • Code Slayer

    Hi @veggie,

    I hope you are doing well today.

    I'm really sorry about the delay. For remove the Force Login, Product Listings Only, and Google ad, please go to the file
    wp-content\plugins\marketpress\marketpress.php
    Line 6200 to line 6231, it will look like this

    <tr>
    					 <th scope="row"><?php _e('Force Login', 'mp') ?></th>
    							<td>
    							<?php $force_login = ($this->get_setting('force_login')) ? 1 : 0; ?>
    							<label><input value="1" name="mp[force_login]" type="radio"<?php checked($force_login, 1) ?> /> <?php _e('Yes', 'mp') ?></label>
    					 <label><input value="0" name="mp[force_login]" type="radio"<?php checked($force_login, 0) ?> /> <?php _e('No', 'mp') ?></label>
    					 <br /><span class="description"><?php _e('Whether or not customers must be registered and logged in to checkout. (Not recommended: Enabling this can lower conversions)', 'mp') ?></span>
    			 			</td>
    					 </tr>
    					 <tr>
    					 <th scope="row"><?php _e('Product Listings Only', 'mp') ?></th>
    							<td>
    							<label><input value="1" name="mp[disable_cart]" type="radio"<?php checked($this->get_setting('disable_cart'), 1) ?> /> <?php _e('Yes', 'mp') ?></label>
    					 <label><input value="0" name="mp[disable_cart]" type="radio"<?php checked($this->get_setting('disable_cart'), 0) ?> /> <?php _e('No', 'mp') ?></label>
    					 <br /><span class="description"><?php _e('This option turns MarketPress into more of a product listing plugin, disabling shopping carts, checkout, and order management. This is useful if you simply want to list items you can buy in a store somewhere else, optionally linking the "Buy Now" buttons to an external site. Some examples are a car dealership, or linking to songs/albums in itunes, or linking to products on another site with your own affiliate links.', 'mp') ?></span>
    			 			</td>
    					 </tr>
    					 <tr>
    							<th scope="row"><?php _e('Google Analytics Ecommerce Tracking', 'mp') ?></th>
    					 <td>
    						<?php if ( MP_LITE === true) { ?>
    						<a class="mp-pro-update" href="https://premium.wpmudev.org/project/e-commerce/" title="<?php _e('Upgrade Now', 'mp'); ?> &raquo;"><?php _e('Upgrade to enable Google Analytics Ecommerce Tracking &raquo;', 'mp'); ?></a><br />
    						<?php } ?>
    						<select name="mp[ga_ecommerce]"<?php echo MP_LITE === true ? ' disabled="disabled"' : ''; ?>>
    								<option value="none"<?php selected($this->get_setting('ga_ecommerce'), 'none') ?>><?php _e('None', 'mp') ?></option>
    								<option value="new"<?php selected($this->get_setting('ga_ecommerce'), 'new') ?>><?php _e('Asynchronous Tracking Code', 'mp') ?></option>
    								<option value="old"<?php selected($this->get_setting('ga_ecommerce'), 'old') ?>><?php _e('Old Tracking Code', 'mp') ?></option>
    								<option value="universal"<?php selected($this->get_setting('ga_ecommerce'), 'universal') ?>><?php _e('Universal Analytics', 'mp') ?></option>
    							</select>
    							<br /><span class="description"><?php _e('If you already use Google Analytics for your website, you can track detailed ecommerce information by enabling this setting. Choose whether you are using the new asynchronous or old tracking code. Before Google Analytics can report ecommerce activity for your website, you must enable ecommerce tracking on the profile settings page for your website. Also keep in mind that some gateways do not reliably show the receipt page, so tracking may not be accurate in those cases. It is recommended to use the PayPal gateway for the most accurate data. <a href="http://analytics.blogspot.com/2009/05/how-to-use-ecommerce-tracking-in-google.html" target="_blank">More information &raquo;</a>', 'mp') ?></span>
    			 			</td>
    					 </tr>

    This is the code contain the Force Login, Product Listings Only, and Google ad, you can remove it from the code. But before doing that, please backup the file first.

    For the paypal live and sandbox, to remove the sandbox option, please find the file
    wp-content\plugins\marketpress\marketpress-includes\plugins-gateway\paypal-express.php

    Line 704, it will be look like
    <option value="sandbox"<?php selected($mp->get_setting('gateways->paypal-express->mode'), 'sandbox') ?>><?php _e('Sandbox', 'mp') ?></option>
    Please remove that from the code,and the only thing now is live mode :slight_smile:.

    Best Regards
    Hoang

  • Hoang Ngo
    • Code Slayer

    Hi @veggie,

    This only remove the display and make user can not see or update the option. It will not mess with the site function. Basicly, it will be same

    Yes, please take a test purchases, personally if anything related to checkout, order or something like that, i will do many test as i can.

    If you have any issues please don't hesitate to let us know so we can assist.

    Best Regards
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.