sbassah
Forum Replies Created
-
Thanks for the response. But I got it to work by updating the PHP version to 7. Just updating this to help any other person having the same issue. Cheers
It works just as requested. Thanks again ??
Thanks a lot.
I’ll give it a try and update on the outcome when done.
Hello,
Version 2.0.25
No, it doesn’t have multisite installI have done the conflict test, by deactivating all plugins and changing themes, but the issue still remains. I remember it was possible to display the members directory and search feature to everyone in the V1 and not just to signed in users.
@rebeccadekk2
I can see you were able to resolve your issue. Can you please help me understand how you were able to have the Members Directory display the search boxes and results even when Users aren’t logged in? I will be very grateful. ThanksI am facing the same issue. It’s not restricting access to specific pages I have set to be only accessible to logged in Users. What may be the cause?
Okay, I fixed it. The do_action hook was outside the form tag. It’s working now that it’s in the form tag. Thanks
You’ve been of great help so far. The addon form is now displays , after adding the
do_action( 'woocommerce_before_add_to_cart_button' );
into my code. However, it pops up a required field error, even though I enter an input the text box and because of that, it doesn’t add to cart. What am I doing wrong, please? ThanksHi,
Thanks for the prompt response. I will try it and update you, of the outcome.
- This reply was modified 6 years, 7 months ago by sbassah.
Actually both. I first added some codes to the function file but the addons wasn’t displaying. I then tried two plugins ie. Woo Variation table and Ni WooCommerce Product Variation.
However, below is the code I used to display the table. What am I doing wrong, please?
function woocommerce_variable_add_to_cart() { global $product; $variations = $product->get_available_variations(); foreach ($variations as $key => $value) { ?> <form action="<?php echo esc_url( $product->add_to_cart_url() ); ?>"method="post" enctype='multipart/form-data'> <input type="hidden" name="variation_id" value="<?php echo $value['variation_id']?>" /> <input type="hidden" name="add-to-cart" value="<?php echo absint( $product->get_id() ); ?>" /> <input type="hidden" name="product_id" value="<?php echo absint( $product->get_id() ); ?>" /> <?php if(!empty($value['attributes'])){ foreach ($value['attributes'] as $attr_key => $attr_value) { ?> <input type="hidden" name="<?php echo $attr_key?>" value="<?php echo $attr_value?>"> <?php } } ?> <table> <tbody> <tr> <td> <?php foreach ($value['attributes'] as $attrKey => $attr) : $tax = str_replace('attribute_', '', $attrKey); $term_obj = get_term_by('slug', $attr, $tax); ?> <td style="width: 40%; float: left;"><b> <?php echo $term_obj->name; ?></b></td> <?php endforeach; ?> </td > <td style="width: 30%; float: left;"> <?php echo $value['price_html'];?> </td> <td style="width: 30%;float: right;"> <button type="submit" class="single_add_to_cart_button button alt"><?php echo apply_filters('single_add_to_cart_text', __( 'Add to cart', 'woocommerce' ), $product->product_type); ?></button> </td> </tr> </tbody> </table> </form> <?php } }
Okay, But I remember that feature used to be available in the previous version. Hopefully, it’s added in the next update. Thanks
Hello,
Thanks for the reply. But that wasn’t exactly what I wanted. Presently the members’ page is accessible to everyone, which is what I actually want. But the Search feature, which is on the members’ page, doesn’t display for logged out users. In the Ultimate Member Directory settings page, I am required to select users who are allowed to see the search feature, but there isn’t an option to allow all users, including logged out users to view the use the search feature.