Forum Replies Created
-
AuthorPosts
-
you should look at the minicart options here
wp-admin/edit.php?post_type=wppizza&page=layoutmaybe attach the minicart to a different element (“Append to element”) instead of the default body element
as you have a number of static elements on your page you might also need to adjust some padding/margins on those
kind of all depends on where exactly you want to display this .i.e what you want to display topmost etc etcto start off with:
your pages are cached please read here
https://docs.wp-pizza.com/getting-started/?section=setup
and in particular
https://docs.wp-pizza.com/faqs/?section=using-a-cache-pluginGood stuff.
happy to hear it. I’ll make that part of the next wppizza update.Thanks for letting me know / testing the fix
This reply has been marked as private.Did you set the webhook in your Stripe account as described in the plugin (gateway) settings ?
thanks for the screenshots. they help a lot and i think i know where the issue is now (just need to find a few variables that are set by WP/WPML)
will post back here when I think i solved iti’m a bit confused now
if I go here:
https://www.[yoursite].it/wp-admin/plugins.php
i get different languages in the descriptions (quite probably because the plugins and their descriptions have no IT translation)
even though WPPizza is DE-activated ???
So i assume you are not actually referring to this ?!if i look at my clone of your site here now i get the same plugins names/descriptions (/wp-admin/plugins.php) as well as the same admin labelling – i.e the stuff on the left like “Media”, “Pagine”, “Prodotti” “Openig Hours” etc etc (/wp-admin)
regardless of whether wppizza is active or not (i can show you screenshots if you like)i must be missing something…:(
please can you give me a distinct example (some text/heading/label somewhere) that changes/is different
depending on whether wppizza is activated or not ….This reply has been marked as private.when you are saying “only a part of it”
which “parts” in particular do not work…
(admin? frontend? some global text strings ? or particular plugins/themes only ?)Assuming you are happy to edit some php files (let me know if that is not the case )
could you please try the following(I dont use WPML really as such , so it would be great if you could let me know if the below solves your problem and does not cause any others elsewhere before I makes this actually part of an update)
in [your site path]/wp-content/plugins/wppizza/classes/class.wppizza.categories.php you will find at approx line 118 the following codeblock
if(function_exists('icl_get_languages')){ global $sitepress; $languages = icl_get_languages(); /**loop through non current languages to get categories**/ foreach($languages as $lang_code=>$lang_arr){ if($lang_code!=ICL_LANGUAGE_CODE){ $sitepress->switch_lang($lang_code); /*get cats for that language**/ $wpml_sort_cats_lang[$lang_code] = get_categories($args); } } /**make sure we switch back to current language when done**/ $sitepress->switch_lang(ICL_LANGUAGE_CODE); }REPLACE that whole codeblock with
if(function_exists('icl_get_languages')){ global $sitepress; $languages = icl_get_languages(); /**loop through non current languages to get categories**/ foreach($languages as $lang_code=>$lang_arr){ if($lang_code!=ICL_LANGUAGE_CODE){ $sitepress->switch_lang($lang_code); /*get cats for that language**/ $wpml_sort_cats_lang[$lang_code] = get_categories($args); } /**make sure we switch back to current language when done**/ $sitepress->switch_lang(ICL_LANGUAGE_CODE); } }i.e move the second ->switch_lang() inside the loop
let me know if that solves the issue in your case too – seems to work fine when i do this here in a test environmentforget that question. i watched the video you linked to and figured it out from there what the versions are
i’ll see what happens when i do this locally here first of all and will get back to you when i know morefirst of all, what versions of wppizza and wpml are we talking about please?
the last one left is using a filter then .
so something like this (i assume you know how wordpress filters work and how/where to use them)/* remove first <td> (label) from customer data in emails and/or print templates */ add_filter('wppizza_filter_template_customer_section', 'myprefix_remove_customer_labels', 10, 3); function myprefix_remove_customer_labels($markup_array, $template_type, $tplId){ /* only filter for print templates else return as is */ if($template_type != 'print'){ return $markup_array; } /* // if required one could also restrict by template id like // if($tplId != 3){return $markup_array;} */ /* quick remove colspan from thead, as we are removing all label td's to end up with one td only per tr */ $markup_array['section_label'] = str_replace('colspan="2"', '' , $markup_array['section_label']); /* all customer data fields - by array keys - where we want to remove the label td intersecting the 2 we want to keep, with the rest */ $customer_data_keys = array_diff( array_keys($markup_array), array('section_label', 'tbody_', '_tbody')); /* remove first td of all customer data */ foreach($customer_data_keys as $cdKey){ /* quick and dirty explode Note: could also (should probably) be done by regex or parsing dom document or whatever else one can think of as perhaps - though not very likely - one day there might end up being a space or something between the "</td><td" for some as yet unknown reason it's just a note if you want to make this more "future proof" */ $orig_string = explode('</td><td', $markup_array[$cdKey]);// explode by closing/opening td's $new_str = '<tr><td'.$orig_string[1];//prepend tr->td to second part of exploded array $markup_array[$cdKey] = $new_str;//put it together } return $markup_array; }4 January, 2020 at 2:37 pm in reply to: Any chance of adding hidden fields with validator rule password #46125This reply has been marked as private.4 January, 2020 at 2:30 pm in reply to: Any chance of adding hidden fields with validator rule password #46124as it turns out – looking at that site – your problem has nothing to do with any of this .
It is simply due to the order page being cached (or perhaps – less likely though – some php session problem)If I clear my cache and go directly to your orderpage (https://yoursite.tld/pantanir/) without ever having put anything into the cart, i STILL get items from some previous / other users.
the order page must not ever be cached
https://docs.wp-pizza.com/getting-started/?section=setup
https://docs.wp-pizza.com/faqs/?section=using-a-cache-plugini would also suggest you update wppizza to the latest version (3.10.7) which addresses a few other potential issue
3 January, 2020 at 7:19 pm in reply to: Any chance of adding hidden fields with validator rule password #46116As of wppizza 3.10.7 noone should be able to use a gateway that is not enabled in your backend , no matter how much they try to tamper with the frontend
of course, if you – or anyone else for that matter – still experiences this , i want to to know about it !!
(I’m kind of surprised myself that i overlooked this possibility for so long to be honest. But better late than never I guess…..)
3 January, 2020 at 5:37 pm in reply to: Any chance of adding hidden fields with validator rule password #46115PS: please mark any reply as private
3 January, 2020 at 5:28 pm in reply to: Any chance of adding hidden fields with validator rule password #46114instead of messing around with hidden fields – which anyone can manipulate anyway (though it depends on what exactly you are doing with it of course) it strikes me like a much better idea to disallow submission of non-enabled gateways in the first place. This should most definitely happen server side.
looking at it in a bit more detail, i can see how one could change from STRIPE for example to COD , and I will certainly fix this as a matter of priority asap.
However, if someone submits a COD order and you have not enabled anything other than one particular credit card gateway, I would have thought you would know that someone has messed around with things and should ignore the order so am not quite sure how someone can successfully claim to have a gift certificate (i dont even know where this “gift certificate” comes from ….)that said, it’s somewhat abstract , so if you can give me a walkthrough on your site as how people claim for some gift certificates as well as manipulate the checkout process i would be most interested.
some random epson doc i have come across which may or may not be relevant
https://files.support.epson.com/htmldocs/pho925/pho925rf/vari_2.htmit says there :
“Printing on roll paper
You need to make your data 4 mm wider than the roll paper.”so a -4mm (left only ?) margin on the body *might* be what works – assuming your printer is an epson printer….
just posting things as i come across them here for future reference perhapsthanks for the screenshots.
from what i can see, your issue isn’t actually the html/css as the printer does seemingly print bold and table columns etc (referring to the screenshot https://prnt.sc/qito1l) but that it forces left and right margins .The most appropriate solution I would think is setting the margins on the printer to something smaller / zero.
However it might be the case that the printer does not allow for this to be adjusted.
If that is the case, my idea would be to add the following to the css declarationsa) set the body margins in the css declaration to something negative . i.e
body { margin-left: -100px; margin-right: -25px; }or perhaps in mm
body { margin-left: -10mm; margin-right: -5mm; }(you might have to play with the values until it fits)
b) regarding customer labels, add the following
#customer tbody > tr > td:first-child { display: none; }which should hide the labels there
always provided the printer does in fact understand this sort of thing.
let me know if the above makes any difference please -
AuthorPosts