southafricanrob
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Store Locator] Create second category filterHi Tjimen,
Thanks for the quick reply and suggestions. I have created this function in my themes functions.php//add a second category dropdown in the search filters function nm_add_second_category_filter(){ $category = '<div id="wpsl-loyalty">' . "\r\n"; $category .= '<label for="wpsl-loyalty-list">Loyalty Program</label>' . "\r\n"; $args = apply_filters( 'wpsl_dropdown_category_args', array( 'show_option_none' => 'Any', 'option_none_value' => '0', 'orderby' => 'NAME', 'order' => 'ASC', 'echo' => 0, 'selected' => $this->set_selected_category( $filter_type ), 'hierarchical' => 1, 'name' => 'wpsl-loyalty', 'id' => 'wpsl-loyalty-list', 'class' => 'wpsl-dropdown wpsl-custom-dropdown', 'taxonomy' => 'wpsl_store_category', 'hide_if_empty' => true ) ); $category .= wp_dropdown_categories( $args ); $category .= '</div>' . "\r\n"; }
but am coming a little unstuck trying to include it in my custom template. Currently I am doing this but is stooping the page from loading.
if ( $this->use_category_filter() ) { $output .= $this->create_category_filter(); //include the second category filter $output .= nm_add_second_category_filter(); }
Also, can you advise why I would need to modify the sql query as it is still just a (additional) category that is being filtered?
Many thanks,Rob
Thank you so much
Thank you Alex – that’s great.
I am using WPClever Product Bundles (not the Woocommerce one) so the classes are different. I have tried to figure out what class the bundles have but the ones I am trying aren’t working.
Is there a way to use Chrome dev tools or similar to inspect the pdf and see what the html is? When I try it looks to be encoded already and stripped of all the html and css?
ThanksHi again,
Thanks – playing around with the debug code helped my find the solution – for me = instead of LIKE worked fine.
Many thanks,Rob
Hi Alex,
They are in the 20-07-2020 format and I was using dd-mm-Y but have tried d-m-Y as well.
My Custom Field filter is_delivery_date LIKE {tomorrow}
but still yield a null result.
If I choose_delivery_date=20-07-2020
then I get a successful export.The exact code I have in the custom PHP field is:
// tweak formats for your needs! add_filter('woe_settings_validate_defaults', function ($settings) { $settings = json_encode($settings); // to string $tomorrow = date("Y-m-d" , strtotime("+1 day", current_time( 'timestamp' ) )); $settings = str_replace( '{tomorrow}', $tomorrow, $settings); $today = date("dd-mm-Y" , current_time( 'timestamp' ) ); // but also tried //$today = date("d-m-Y" , current_time( 'timestamp' ) ); $settings = str_replace( '{today}', $today, $settings); $settings = json_decode($settings, true); // to array return $settings; } );
Many thanks!
- This reply was modified 4 years, 4 months ago by southafricanrob.
Thank Alex,
I did follow the help topic but get a null ouput – i just wasn’t quite sure what you meant by replace {tomorrow}…?
Do i replace it in this line :
$settings = str_replace( ‘{tomorrow}’, $tomorrow, $settings);
and if so with what?
Many thanks,Rob
Hi,
I am also trying out this code but not quite sure what you mean by “replace {tomorrow} and {today} with actual values comparison operators”
Could you elaborate?
Many thanks,Many thanks – that worked perfectly
Thanks for the super quick response and snippet. I think I see what you’re going for there – remove any category that isn’t a parent? I tested and ran into some issues – I think it is my category structure though. I have for e.g Meats as a parent and then Beef, Pork, Chicken etc as children.
My products are only Beef for e.g not Meats and Beef. I assumed Meats would be the parent as Beef is its child. I’ll play around and see what I can figure out and post here if I come right in case it helps others.
Again – thanks -great plugin and supportThanks – thats great
Aha – I was looking under Other not Products – many thanks – working now. However I’d like to sort the report by this custom field – its not showing under ‘Sort order by’ option?
- This reply was modified 5 years, 2 months ago by southafricanrob.
Forum: Plugins
In reply to: [Animate It!] Cannot disable on mobile or tabletAha – thanks – i was testing in a small browser window. Many thanks for a great plugin and excellent support
Forum: Plugins
In reply to: [Animate It!] Scroll Offset (in percentage):Thanks – that perfect!
Forum: Plugins
In reply to: [Animate It!] Scroll Offset (in percentage):Many thanks – makes sense. I seem to have it working for the “Why Buy From Us” section, animations happen just after all the image is in view (offset set to 120%).
The section before however (“How Does it Work”) doesn’t seem to work the same, if i set offset to around 220% then it works. Is this perhaps a margin issue as I have some negative margin values? If so is it possible to set offset percantage within the individual animated elements themselves?
Thanks for the support thus far, and an excellent plugin.
Cheers,
RobForum: Plugins
In reply to: [WP YouTube Lyte] How to use with Embeded Code?Hi – can you maybe shed some more light on using with custom fields? – I’m not quite sure from the the answer in the FAQ.
Thanks,