Forum Replies Created
-
AuthorPosts
-
although there’s probably a case that can be made to perhaps do some scripting that would account for this, the fundamental problem from what i can see is as follows:
though your pages are translated , you are using the non-translated shortcode on these pages.
i.e on your IT page you are using
[wppizza category='crepes' noheader='1' showadditives='0']which works fine, as we know
however, on the EN translation your are ALSO using[wppizza category='crepes' noheader='1' showadditives='0']where you should be using the shortcode that references the EN categories – that is[wppizza category='crepes-en' noheader='1' showadditives='0']
(note the category slug difference)not using the associated slug will in effect result in the categories not existing for that language (in simple terms) which will throw these issues and therefore the plugin will not be able to add anything (categories are somewhat essential for all sort of things)
let me know if the above makes sense. (certainly fixes it when i do this here with your setup)
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.looking at your /wp-content/debug.log when (unsuccessfully) trying to add something to the cart myself here
https://www.pizzeriacarignano.it/en/order-online/crepes/
i get aUndefined offset:....../class.wppizza.categories.php on line 192which leads me to believe it’s (perhaps – cannot be sure yet ) a non-translated category ?
can i ask you this as well please: are all categories that an item belongs to also available (and translated) for your other languages ? or maybe there’s an option in WPML that lets you enable/disable this ?
just trying to narrow things down . After all I do not know every single option available in WPML as I am not the developer of WPML of courseI’ll see if I can reproduce this here first of all
from what you are saying this would seem to be an issue with the add ingredients plugin in conjunction with WPML, which narrows it down somewhat
will get back to you when i know more, but this might take a little bit
there are now some globally available and more versatile wrapper functions available
https://docs.wp-pizza.com/developers/?section=email-print-templates“Warning from paypal custommer service” is also a misleading topic . nowhere in that email is anyone saying they are from paypal or paypal customer service (legally that would probably be misrepresentation or whatnot – i’m not a lawyer – and lead to jailterms if caught)
sure , if you give them access to your paypal account they will be “looking after your account” , but not in the way you want them to , i can assure you
Generally speaking though, if you are worried about things, contact paypal directly (and don’t reply to those emails, but literally pick up the phone or go to their website and contact them there)
Same applies to anything else along these lines; paypal , stripe or whatever other payment gateway or accounts you use/haveAnd last but not least: I really am the wrong person here to contact for this sort of thing. I am not a security researcher or advisor. Actions you take regarding emails you receive are really your responsibility.
The above is my take on things as I see it from the information you provided and I am happy to give you my thoughts on this
BUT, the security of your paypal (or any other) account lies with you. I am not responsible for the actions you do or do not take (Just want to make this clear)>I just got a mail from paypal.
no, you did not. all you did was get some rubbish from people that want to rip you offshould have been perfectly clear when they were referencing woocommerce to start off with – unless you are using woocommerce of course, but then I suspect you would have contacted woocommerce I would think.
Not to mention the “I could not reach you by phone…” and pretty much the whole rest of that email
15 March, 2019 at 1:38 pm in reply to: Shortcode add_item_to_cart returns a category error after update #42150thinking out loud for a sec. i wonder if this is actually down to something that changed in wordpress itself.
I am not going to spend too much time finding out if this is the case, however it is simply a matter of replacing (my end)$first_term = get_the_terms($atts['id'], WPPIZZA_TAXONOMY);, which worked like that for years with
$first_term = wp_get_post_terms($atts['id'], WPPIZZA_TAXONOMY);no, i don’t know either why the 1st doesnt seem to work anymore but the 2nd does. oh well
15 March, 2019 at 1:13 pm in reply to: Shortcode add_item_to_cart returns a category error after update #42149ok, using the ‘add_item_to_cart_button’ in the loop like that seems to have got lost in the porting from v2.x to v3.x
i’ll amend that in the next update . essentially in this case the category id does not get passed on if you use it like you doin the meantime, you can work around this by simply passing on the cat id as well . i.e something like this)
<?php // before the loop. $obj = get_queried_object(); $cat_id = $obj->term_id; // Start the loop. while ( have_posts() ) : the_post(); echo do_shortcode("[wppizza type='add_item_to_cart_button' id='".get_the_ID()."' category_id='".$cat_id."' ]"); endwhile; ?>15 March, 2019 at 9:10 am in reply to: Shortcode add_item_to_cart returns a category error after update #42141question:
how exactly are you generating the output of this page
/matsedill/shakes/
secondly, what happens if you use a default theme (like 2016 for example)there are (still) no short or medium term plans to implement this sort of thing
14 March, 2019 at 9:52 pm in reply to: Shortcode add_item_to_cart returns a category error after update #42134I’d need a link to the page in question really.
the above is/was really just guesswork on the info supplied1)
you MUST learn how wordpress action and filter hooks work if you want to do ANY kind of wordpress alteration that are beyond just simple point and click
here’s a quick overviewhttps://docs.wp-pizza.com/developers/?section=filters-actions-functions
2) it depends on where you put your code (i strongly suggest you use child themes as they do not get updated when you update your theme)
the reason why it’s not in the template section is because it’s coming from the add ingredients plugin and the options that plugin provides to add things to orders would make it completely unmanageble if added to the inputs of th etemplates
your filter will the look *something like* this (depending what exactly you want to achieve, but as a starting point)
add_filter('wppizza_ingredients_filter_email_styles', 'myprefix_filter'); function myprefix_filter($styles){ /* the 120% here overrides any previous (default of 85%) font-size declaration for the element */ $styles[ingrinfo] .= 'font-size:120%;'; return $styles; }PS: the default $styles array is this
$styles = array(); $styles['ingrinfo'] = 'white-space: initial; margin: 3px; line-height: 130%;' ; $styles['ingr_item'] = 'font-style: italic;' ; $styles['ingrinfo'] = 'white-space: initial; margin: 3px 3px 3px 20px; line-height: 130%; font-size:85%;' ; $styles['ingrgrp'] = 'white-space: initial; margin: 3px;line-height: 130%;' ; $styles['ingrgrp_0'] = 'white-space: initial; margin: 3px;line-height: 130%; display:inline' ; $styles['ingrgrp_1'] = 'white-space: initial; margin: 3px;line-height: 130%; margin-left: 15px' ; $styles['ingrgrp_lbl'] = 'font-weight: bold; padding-right: 3px;' ; $styles['comments'] = 'padding: 3px 0; font-size: 75%;' ;you can only do this using filters
assuming that you know how filters work, this is the one that’s added for this ($styles being an array of different elements )$styles = apply_filters('wppizza_ingredients_filter_email_styles', $styles );13 March, 2019 at 3:06 pm in reply to: Shortcode add_item_to_cart returns a category error after update #42108wppizza menu items (just like normal WP posts) must be assigned to a category
if you do not set one – and when i add something in an update that deals with avoiding this warning – all that would happen is that i would force a category for you programatically (the first/top one in your wppizza categories list)
so you might as well select one that is most likely more appropriate i would thinkhope that explains things somewhat
13 March, 2019 at 2:51 pm in reply to: Shortcode add_item_to_cart returns a category error after update #42107updating from what version to what version exactly
in any event, that’s – most probably – because your item is not associated with any category
although i can add something that would suppress this warning, i would really suggest you select a category to go with it -
AuthorPosts