shenalorlof
Forum Replies Created
-
Forum: Plugins
In reply to: [Extra Product Options for WooCommerce] Quantity along with pricehttps://ibb.co/mCF4M2L Like this as in attached image
Forum: Plugins
In reply to: [Grid/List View for WooCommerce] Product thumbnail box-shadow in mouse hoverHi,
So my requirement cannot be done?Thank you
Hello @wpdevruddro …
Did u find a solution to this friend?Forum: Plugins
In reply to: [GEO my WP] Display products by location in seperate pagesHello @ninjew hope you are fine in this pandemic situation
First i want to thank you for your excellent service.. I have a Two questions please..01) How can i find the form id which comes by default in WCFM add new product page
1. https://ibb.co/b6wPgDw
2. https://ibb.co/WtSMrXqThis came when i activate the plugin i didn’t add any new form to this..
02) i added a new page with state in the url parameter. hope i did this correct
1. https://ibb.co/gR1g79ZThank you, hope to hear from you soon.
- This reply was modified 3 years, 11 months ago by shenalorlof.
Forum: Plugins
In reply to: [GEO my WP] [ URGENT ] Display products by location with an additional fieldcan you help me with the custom coding. please.. and btw i can’t create a form and add it to the using a shortcode to WCFM it should come as default
Forum: Plugins
In reply to: [GEO my WP] Shows a shortcode in the pageWorked. thank u very much
This code works.
function ijab_random_products() { ?> <ul class="products columns-3"> <?php $args = array( 'post_type' => 'product', 'posts_per_page' => 20, 'orderby' => 'date', 'no_found_rows' => true, ); $counter = 1; $max = 6; $loop = new WP_Query( $args ); shuffle($loop->posts); if ( $loop->have_posts() ) { while ( ($loop->have_posts()) && ($counter <= $max) ) : $loop->the_post(); wc_get_template_part( 'content', 'product' ); $counter++; endwhile; } else { echo __( 'No products found' ); } wp_reset_postdata(); ?> </ul> <?php } add_shortcode( 'randomprod', 'ijab_random_products' );
Thank you @3sonsdevelopment . Xd. Thank you for your help. Thumbs up. ?
Hello @3sonsdevelopment, hope you doing good.
I uploaded like 100 products in this year but it shows product I added n 2020 December as well. ?? any conflict? I’m uploading products through WCFM multivendor cz this is a multivendor siteHi @rur165 thank you for ur reply. But what I want is to show 6 products from the latest 20 products. Which is 1 row 6 columns. 20 latest products in shuffle (random order)
Thank you
Dear supporters,
Can we change the above code something like this code please? i want to display 6 products from the latest 20 products in a random order (shuffle).. like this https://ibb.co/3cxn43C
Hope this code might give an idea..
$recent_posts = wp_get_recent_posts( array( ‘numberposts’ => 20, // Number of recent posts ‘post_status’ => ‘publish’, // Show only the published posts ‘post_type’ => ‘product’ )); $sub = array_splice( $recent_posts, 10, 10 );// array_splice ( array, offset, length ) shuffle( $sub ); // Random array_splice( $recent_posts, 10, 0, $sub ); foreach( $recent_posts as $post ) { echo $post[‘ID’] . ‘<br>’; //echo ‘ ', print_r( $post, 1), ' ‘; } // Loop wp_reset_query();
>> Show 6 products in a row from the last 20 products in a random order << i want it to be show like this as in the image https://ibb.co/3cxn43C
Thank you in advance dear supporters
- This reply was modified 3 years, 11 months ago by shenalorlof.
Can you change this to as in the above please i want to display 6 products from the latest 20 products.. like this https://ibb.co/3cxn43C @3sonsdevelopment
Hope this code might give an idea..$recent_posts = wp_get_recent_posts( array(
‘numberposts’ => 20, // Number of recent posts
‘post_status’ => ‘publish’, // Show only the published posts
‘post_type’ => ‘product’
));$sub = array_splice( $recent_posts, 10, 10 );// array_splice ( array, offset, length )
shuffle( $sub ); // Random
array_splice( $recent_posts, 10, 0, $sub );
foreach( $recent_posts as $post ) {
echo $post[‘ID’] . ‘<br>’;
//echo ‘', print_r( $post, 1), '
‘;
} // Loopwp_reset_query();
- This reply was modified 3 years, 11 months ago by shenalorlof.
Hi @3sonsdevelopment. First I would like to thank you great support.. there’s a problem , unfortunately not working ?? . it shows me old products as well which i uploaded last year.
Can we do like this, the logic..
First we sort products by the date,
Second take 20 products starting from the first row
Third shuffle that 20 products we got and display 6 in a rowCan we do this and get this done @3sonsdevelopment
Thank you
@3sonsdevelopment
Hi wow, thank u for up response supporter. finally. This is great. Can u do me one more favour. Can I get this code in full please. With the shuffle and function so I can add to a shortcode. Thank you in advance.Forum: Plugins
In reply to: [WooCommerce] Display Products by locationHi supporter, thank u for ur reply, Yes.. but i cant ask sellers to select the product location from the category. right? i mean it is not that nice. and i cant make sure that everyone will select the location in the category list. right? soo is there any ethical way that i can do this? I’m using WCFM as my multivendor plugin
Thank you in advance