• Resolved rishiichaudharyy

    (@rishiichaudharyy)


    Actually I’m converting default woocommerce sorting select to M3 Web Select. Here is code,

    https://material-web.dev/components/select/

    <form class="woocommerce-ordering" method="get">
    	<md-outlined-select form name="orderby" class="orderby" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
    		<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
    			<md-select-option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>>
    				<div slot="headline"><?php echo esc_html( $name ); ?></div>
    			</md-select-option>
    		<?php endforeach; ?>
    	</md-outlined-select>
    	<input type="hidden" name="paged" value="1" />
    	<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
    </form>
    

    this code render select perfectly but after selecting it’s not submiting it’s value.

    Here is woocommerce default sorting select which is working fine

    <form class="woocommerce-ordering" method="get">
    	<select name="orderby" class="orderby" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
    		<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
    			<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
    		<?php endforeach; ?>
    	</select>
    	<input type="hidden" name="paged" value="1" />
    	<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
    </form>
    
    
    
Viewing 1 replies (of 1 total)
  • Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @rishiichaudharyy,

    Thank you for your message. I understand that you’re trying to customize the default sorting code with a custom version. However, I’m afraid that our support scope is limited to the default plugin and its functionalities out of the box. Any customization is out of our support scope. Learn more here.

    In this case I can recommend the Woo Developer Resources Portal for resources on developing for Woo. You can also visit the WooCommerce Facebook group or the #developers channel of the Woo Community Slack. We’re lucky to have a great community of open-source developers for Woo, and many of our developers hang out there, as well!

    Cheers!
    -OP

Viewing 1 replies (of 1 total)
  • The topic ‘Select Value Not Submitting’ is closed to new replies.