botwan
Forum Replies Created
-
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Script to min/max addon itemYou can add this script, it should work…
<script> jQuery('input[type=checkbox]').change(function(e){ if (jQuery('input[type=checkbox]:checked').length > 4) { jQuery(this).prop('checked', false); alert("Check max 4 ingredients"); } if (jQuery('input[type=checkbox]:checked').length < 2) { alert("Check min 2 ingredients"); } });Thank you very much, @marco-polo-1
It works great!I have same visual problem as @oromerosilva92 after updating to RestroPress 2.5.3
I install every new version in a localhost so I cannot publish link.Can you resolve this visual problem?
Thank youForum: Plugins
In reply to: [RestroPress - Online Food Ordering System] CurrencyI found the solution in RestroPress documentation.
If you want to include your Own Currency, then you can use the following codes and place it your active theme’s function.php file:
function rpress_custom_currencies( $currencies ) { $currencies['₭'] = __( 'Lao Kip', 'restropress' ); return $currencies; } add_filter('rpress_currencies', 'rpress_custom_currencies');If you want to Remove the Decimal from your Currency, you can use this code in your active theme’s functions.php file:
add_filter( ‘rpress_currency_decimal_count’, ‘rpress_remove_decimal’ ); function rpress_remove_decimal( $decimals ) { $decimals = 0; return $decimals; }As far as I know, you can have different delivery fees for every ZIP code using the extension Delivery Fees.
I don’t know about order restriction based on ZIP codes.
Maybe the developers can find a solution for your needs.
@irasta
I resolved adding a jQuery script directly in the Food Item post which I want to limit addons selection (obviuosly using text mode, NOT visual mode).This is the script:
<script> jQuery('input[type=checkbox]').change(function(e){ if (jQuery('input[type=checkbox]:checked').length > 3) { jQuery(this).prop('checked', false); } }) </script>You just need to copy it and change the number 3 to the selection limit you need. I hope this can help someone else with my same problem, before an official feature update will be released.
Forum: Plugins
In reply to: [RestroPress - Online Food Ordering System] Italian translationThank you very much, Luigi! I totally agree with your choice to translate Food Items with “Prodotti”.
Thank you so much, that was the problem! I checked and corrected other similar typos before, but i missed that, unfortunately…
Now everything works correctly!
Thank you Tobias!!!I did the change and now the column date doesn’t sort anymore.
Previously I tried alsodate-ukwithout success.What can I do?
Hi Tobias,
I’m trying to sort a date column without success. I followed all the advices on this forum page and also tried to understand the DataTables manual.
I have to sort by date in the format dd/mm/yyyy. I installed the plugin “DataTables sorting” and I also assigned the Additional Command:
"columnDefs": [ { "type": "date-eu", "targets": [ 0 ] } ]
as the date it is in the first column.When I sort the column in the front-end, it sorts it by day, then month, then year, instead of year, month, day as it should work…
Can you have a look here? Table DateThank you very much for your help and advices!
- This reply was modified 7 years, 9 months ago by botwan.
Forum: Plugins
In reply to: [VS Event List] Change navigation from Next-Previous to page numbersI also think that the fake integer is horrible, anyway it is in the WordPress Codex example, so I included it.
Forum: Plugins
In reply to: [VS Event List] Change navigation from Next-Previous to page numbersDear Guido,
i already tried previously the WP-PageNavi but it didn’t work correctly.
At the end I finally found a solution! 🙂I used the paginate_links function from WordPress codex.
Using this function I was able to insert the $vsel_query->max_num_pages ); your plugin needs.This is the code I used, replacing your pagination code, and it works correctly. It shows Previous and Next on the sides and all page numbers in the center:
$big = 999999999; // need an unlikely integer $vselpagenumbers = array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '/page/%#%', 'total' => $vsel_all_query->max_num_pages, 'show_all' => true, 'prev_next' => true, 'prev_text' => __('« Previous'), 'next_text' => __('Next »'), 'type' => 'plain', ); $output .= '<div class="vsel-nav">'; $output .= paginate_links( $vselpagenumbers ); $output .= '</div>';And I added this CSS:
#vsel .vsel-nav { text-align: center !important; }Hope this helps!
If you see something wrong in my code, or other, I will happily accept your advices.
Thank you for your help.Francesco
- This reply was modified 8 years, 3 months ago by botwan.
Forum: Plugins
In reply to: [VS Event List] Change navigation from Next-Previous to page numbersI understand and I really appreciate your help if you could have a look into the problem.
Anyway, I have an alternative, maintaining “as-is” the next-previous buttons. Is it possibile to just add a function who shows “Page X of Y”, where X is the actual page and Y is the total page numbers?
I don’t know which of the solutions is more simple, but I’d really appreciate your advices. Thank you very much.
Francesco
Forum: Plugins
In reply to: [VS Event List] All Events pagination and posts per pageI solved changing the value of “most readed articles” in WordPress Settings / Reading.
Forum: Plugins
In reply to: [VS Event List] Change navigation from Next-Previous to page numbersDear Guido, thank you for your fast answer!
I replaced the pagination section of All Events shortcode in vsel-shortcode.php with the following code:
$output .= '<div class="vsel-page-nav">'; $output .= the_posts_pagination( array('mid_size' => 5, 'prev_text' => __( '« Previous', 'very-simple-event-list' ), 'next_text' => __( 'Next »', 'very-simple-event-list' ), ) ); $output .= '</div>';Unfortunately it doesn’t show anything.
I also tried the get_the_posts_pagination function, but it doesn’t show anything in the page.Obviously I also tried to replace the code without any modification, just pasting the example in the WordPress Codex, but no luck too.
$output .= the_posts_pagination( array('mid_size' => 2, 'prev_text' => __('Back', 'textdomain' ), 'next_text' => __( 'Onward', 'textdomain' ),) );Am I doing something wrong?
Thank you again for your help.
Francesco