Forum Replies Created
-
AuthorPosts
-
louKyLoukParticipant
Here attached what I did.
If you want me to show you the code I added, I can.louKyLoukParticipantHi indeed I forgot the screenshot, here you can find the actual error from add product without title, content and excerpt (first what are those : content and excerpt, this is not explicit for any vendor, why not replace the “excerpt” word by “short description”). Here the error is talking about the “content, title and excerpt”. Indeed they are all empty, but if I publish with either “excerpt” (short description) filled up, and with “title” and “content” empty. The right flow will be : no product added, error showing “title and content empty”, but currently the product is added, with no title, no price, no content, just the short description.
Now, I don’t have any issue, my solution is, your error management is not how I needed it. For exemple if a vendor publish a product without price it will be added. What I need was, if a vendor publish a product without a price, an error appear about the price itself and nothing published.I’ll send you to the next post a screenshot of what I did by myslef for managing correctly the errors.
I added my own code into “wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-dashboard.php”
louKyLoukParticipantHi, I finnaly found where is executed the POST form for add a product, in wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-dashboard.php
I am doing my changements actually.
As you can see in the attached screenshot (the original error when a vendor publish a product without title for exemple), I was looking for manage my own errors, as regular price is required (currently no). So now I made it mandatory. And now the same error in the screenshot appear but with the regular price required message.louKyLoukParticipantHi, I have seen an answer but it seems she disappears. But In order to explain me better, I already know where is located the source code of the add product page, in wp-content/plugins/dc-woocommerce-multi-vendor/templates/vendor-dashboard/product-manager/edit-product.php. But here my question is, where is the executed code ? (Like where is executed and read the form by PHP, when vendors click “publish” ?). How is treated the data by the form submited ?
November 28, 2022 at 7:46 PM in reply to: Translation plugin dc-woocommerce-multi-vendor problem #146889louKyLoukParticipantI finally fix the problem, it was because of .po files inside wp-content/plugins/dc-woocommerce-multi-vendor/languages.
Now it’s okNovember 28, 2022 at 2:11 PM in reply to: Translation plugin dc-woocommerce-multi-vendor problem #146870louKyLoukParticipantI think you didn’t really understand my question, I was asking you in the previously post, about the code, and how it works. And yes I’m using WC Marketplace, but here we are again as I said before, I already have translated everything’s but as you can see on my screenshot it didn’t works. That’s why I asked you about the code in order to try to debug it.
November 25, 2022 at 3:15 PM in reply to: Translation plugin dc-woocommerce-multi-vendor problem #146778louKyLoukParticipantOk thanks, when you are saying strings are from MultiVendorX, I’m still with WCMp version, is it the same ?
In order to be sure I’ve a great understanding of wordpress plugins translation, this php line :
“<?php echo __( ‘Sale price’, ‘dc-woocommerce-multi-vendor’ ) . ‘ (‘ . get_woocommerce_currency_symbol() . ‘)’; ?>”It will translate ‘Sale price’ with the languages in ‘dc-woocommerce-multi-vendor’ plugin ?
louKyLoukParticipantHi,
I actually found the way to solve my question, I added this code in functions.php :
function hide_wcmp_dashboard_submenu( $nav ) {
if(isset($nav[‘store-settings’])){
$nav[‘store-settings’][‘submenu’][‘vendor-shipping’] = 0;
}
return $nav;
}
add_filter(‘wcmp_vendor_dashboard_nav’, ‘hide_wcmp_dashboard_submenu’);It works.
louKyLoukParticipantHi,
Your solution finally works I was doing something in the wrong way.
My initial problem is solved.Bye
louKyLoukParticipantYes, Thanks, but as I said before. I already tried to override this template by comment some line inside this file, but nothing happened. Do you have any idea about why, is it the right file ?
louKyLoukParticipantHi, thanks for your help, but about this solution I already found it. And this is not the convenient solution because here, with your proposed solution with CSS, the vendors informations are still accessible on the page source code (with inspect for exemple).
What I would like is to remove these from the source code, that’s why in a precedent post I talked you about this file :
dc-woocommerce-multi-vendor/templates/shortcode/vendor-list/content-vendor.phpHere, in this file, the source code of this page. How can I modify directly this file ? Maybe with “add_filter” or “add_action” ?
louKyLoukParticipantAs I said in the first post :
“Hi,
I would like to hide some content from [wcmp_vendorslist], like the address and the phones number of my vendors.
Do you have any solutions ?Thanks”
I want to hide or complety remove what I show you on the screenshot that I already sent to you.
I’m talking about the page who is listing all my vendors, built with [wcmp_vendorslist].This page is showing all the address and phones numbers of my vendors, exactly what I want to remove or hide.
louKyLoukParticipantTo add more precision, I’d tried to comment this code :
<div class=”vendor-header-icon”>
<div class=”dashicons dashicons-phone”>
<div class=”on-hover-cls”>
<p><?php echo esc_html($vendor_phone); ?></p>
</div>
</div>
<div class=”dashicons dashicons-location”>
<div class=”on-hover-cls”>
<p><?php echo $vendor->get_formatted_address() ? $vendor->get_formatted_address() : __(‘No Address found’, ‘dc-woocommerce-multi-vendor’); ?></p>
</div>
</div>
</div>in this file : dc-woocommerce-multi-vendor/templates/shortcode/vendor-list/content-vendor.php. But there was no effect.
So I was looking for a filter or an action to be able to do what I want.Thanks for your help
louKyLoukParticipantThe changes I’m looking for are described by the red arrows on the screenshot.
louKyLoukParticipantHi,
Thanks for the details wcmp vs mvx. Something strange happened, my precedent technique as I told you before (modify the vendor_dashboard.min.css file) was working well for me (on my machine). But for other people on their machine no.But everythings is good for now I used your method with wcmp_
Thanks -
AuthorPosts