lifrth
Forum Replies Created
-
Hi, thanks for responding, do we put that code in functions.php?
We’ve tested the vendor page with various themes including twentytwentythree and pages 1,2,3,4 and so on do not show on those themes either. We also removed infinite scroll from the woodmart settings and chose pagination, still no next page on vendor pages.
@adio93 What happens when you change the default 12 to 24? Does it load 24 products?
@adio93 Think ive found a solution, it works for me using infinite scroll, you” have to test if you need 1,2,3,4 and so on pages but in your plugin theme files go to:
marketking-multivendor-marketplace-for-woocommerce/public/templates/store-page.php
Line 309 you’ll see: [products limit=”‘.apply_filters(‘marketking_default_products_number’,12)
Change to: [products limit=”-1′.apply_filters(‘marketking_default_products_number’,20)
You can change “20” to anything you wish, click save – If it works, it’s probably best to copy the changes into your child theme.
@adio93 Looks to be with every theme, there is no pagination whatsoever on the Marketking Vendor Pages
@adio93 Hi, yeah – Woodmart categories pages works fine, the vendor page not at all
Thanks for responding guys,
I tried the code you posted and it still doesnt work, it doesnt register those taxonomies as attributes within the product
One thing that isnt happening is when for example the brand is selected and saved, it doesnt save as product attribute (pa_brand)
Anyway we can add code to make this possible?
Via dokan this was acheived by adding this snippet
add_action( ‘dokan_new_product_added’, ‘tonebay_save_add_product_meta’, 10, 2 );
add_action( ‘dokan_product_updated’, ‘tonebay_save_add_product_meta’, 10, 2 );
function tonebay_save_add_product_meta($product_id,$postdata){
$pa_brand = get_term_by(‘id’,$postdata[‘acf’][‘field_6543ae15a51bb’],’pa_brand’);
$pa_color = get_term_by(‘id’,$postdata[‘acf’][‘field_6543b3a94ddf2′],’pa_color’);
$pa_model = get_term_by(‘id’,$postdata[‘acf’][‘field_654b8d7ee81f9′],’pa_model’);
$pa_year = get_term_by(‘id’,$postdata[‘acf’][‘field_654b8dc711c84′],’pa_year-decade’);
$pa_condition = get_term_by(‘id’,$postdata[‘acf’][‘field_654b8de211c85′],’pa_condition’);wp_set_object_terms( $product_id, $pa_brand->slug, 'pa_brand', true ); wp_set_object_terms( $product_id, $pa_color->slug, 'pa_color', true ); wp_set_object_terms( $product_id, $pa_model->slug, 'pa_model', true ); wp_set_object_terms( $product_id, $pa_year->slug, 'pa_year-decade', true ); wp_set_object_terms( $product_id, $pa_condition->slug, 'pa_condition', true ); $att_color = Array('pa_color' =>Array( 'name'=>'pa_color', 'value'=>$pa_color->slug, 'is_visible' => '1', 'is_taxonomy' => '1' ), 'pa_brand' =>Array( 'name'=>'pa_brand', 'value'=>$pa_brand->slug, 'is_visible' => '1', 'is_taxonomy' => '1'), 'pa_condition' =>Array( 'name'=>'pa_condition', 'value'=>$pa_condition->slug, 'is_visible' => '1', 'is_taxonomy' => '1'), 'pa_model' =>Array( 'name'=>'pa_model', 'value'=>$pa_model->slug, 'is_visible' => '1', 'is_taxonomy' => '1'), 'pa_year-decade' =>Array( 'name'=>'pa_year-decade', 'value'=>$pa_year->slug, 'is_visible' => '1', 'is_taxonomy' => '1') ); update_post_meta( $product_id, '_product_attributes', $att_color);}
Thanks,
I can add attribute fields that are required to be chosen by the vendor when creating a product, i found this tutorial: https://woocommerce-multivendor.com/docs/adding-editable-product-fields-with-acf-in-marketking/
Ive managed to add “Brand” as a drop down which is working, in ACF i have a field group with – Brand, Colour, Model, Year etc is there a way to add them all at once or do i have to do them individually but using this code over and over again, replacing ‘brand’ with ‘model, ‘colour’ and so on? Thanks!
add_action( 'marketking_edit_product_after_tags', function($post){ acf_form_head(); ?> <div class="col-xxl-12 col-md-12 marketking_card_gal_cat_tags" style="background: white; padding:20px;border-radius: 4px;"> <?php $product_id = $post->ID; acf_form(array( 'fields' => array('productcolor'), 'form' => false, 'post_id' => $product_id, )); ?> </div> <?php });Thanks,
Yes, thats the type of thing we are looking for, could you recommend any developers?
Thanks
That all sounds great.
It’d be great to see those store using their own flows, really interesting.
Kind regards