Forum Replies Created

Viewing 15 replies - 31 through 45 (of 92 total)
  • Thread Starter petschko

    (@petschko)

    Lately I was a bit more busy doing other stuff, so I temporary disabled Antispam-Bee. I will write here once I have a bit time to look into that issue

    (Should be next week, sorry for making you wait =()

    Thread Starter petschko

    (@petschko)

    Ich kann hier für die Lösung u.a. auf das Plugin “Plugin-Organizer” verweisen, mit den man generel viele unnötige Plugins auf vielen Seiten abstellen kann. Geschwindigkeitsvorteil Server & Client-Seitig~

    Allerdings muss man sich erst einmal einarbeiten, für die Lösung meines Problems hat es geholfen. Ich habe PayPal-Plus auf allen Seiten, außer Checkout, Produkte, /?wc-ajax=* deaktiviert (neben vielen anderen Plugins)

    Thread Starter petschko

    (@petschko)

    We are using the default Theme of WooCommerce (Storefront)

    I disabled all Plugins except Antispam-Bee and WooCommerce and Commenting was possible, maybe it has some issue with an other Plugin, I write here once I find out which one

    Thank you so far!

    Does this Plugin need write-access on some directories on the Server?

    • This reply was modified 6 years, 7 months ago by petschko. Reason: Found the conflicting Plugin
    • This reply was modified 6 years, 7 months ago by petschko.
    • This reply was modified 6 years, 7 months ago by petschko.
    Thread Starter petschko

    (@petschko)

    Ops I found the issue, but only thanks to this post: https://wordpress.org/support/topic/incompatible-with-woocommerce-3-2-1-and-paypal-plus-for-woocommerce/#post-9627970

    It was the ?wc-ajax=* which caused the issue, as I saw even on my test site the homepage has the plugins disabled on the homepage, but ?wc-ajax= points to the homepage…

    Now I got it to work, at least I found a handle to solve that issue^^

    Thread Starter petschko

    (@petschko)

    Der Hotfix ist denke ich nicht die eleganteste Lösung, sprich man kann das sicherlich anders lösen. Ich habe einfach nur ein kleines JavaScript geschrieben, welches das PayPal-Iframe versteckt, bis alle variationen ausgewählt sind.

    Am liebsten würde ich den Button deaktivieren, da es aber ein IFrame ist, war es das leichteste dieses einfach zu verstecken.

    Wer Lust hat, kann sich das snippet hier einfach nehmen, die Funktion addPPPExpressValidation() muss noch nachdem sie Seite geladen hat, gecalled werden.
    Das Script sollte man ggf nur auf Produktseiten einbinden, ist aber auch dazu fähig in eine globale JS eingebunden zu werden. Die Funktionen verhindern weiteres ausführen, wenn es sich um eine nicht Produkt-Seite bzw um eine einzel Produkt-Seite handelt.

    
    /**
     * Adds the PayPal-Express button Validation
     */
    function addPPPExpressValidation() {
    	let variationForm = document.getElementsByClassName('variations_form cart');
    
    	// Exit on any other product/page which dont have this element
    	if(! variationForm.length)
    		return;
    
    	// Make sure to get only the variation selects
    	let variationTable = document.getElementsByClassName('variations');
    
    	// Add Event-Listener to all variation selects
    	let variationSelects = variationTable[0].getElementsByTagName('select');
    	for(let i = 0; i < variationSelects.length; i++) {
    		variationSelects[i][window.addEventListener ? 'addEventListener' : 'attachEvent'](window.addEventListener ? 'change' : 'onchange', function (variations) {
    			return function (ev) {
    				disablePPPExpressButtonOnEmptyVariation(variations);
    			};
    		}(variationSelects), false);
    	}
    
    	// Also run once to ensure the pp button is vanish before (if no user interaction)
    	disablePPPExpressButtonOnEmptyVariation(variationSelects);
    }
    
    /**
     * Disables (aka hide) the PayPal-Plus-Button, when a variation is not filed out
     *
     * @param {HTMLCollection} variations - Variation-selects Element-list
     */
    function disablePPPExpressButtonOnEmptyVariation(variations) {
    	if(! variations || ! variations.length)
    		return;
    
    	// Get all variation selects and check if they are filled
    	let variationsFilled = true;
    	for(let i = 0; i < variations.length; i++) {
    		if(! variations[i].value) {
    			variationsFilled = false;
    			break;
    		}
    	}
    
    	// Get the Paypal-"Button"-Container
    	let paypalExpressContainer = document.getElementsByClassName('woo-paypalplus-checkout-button');
    
    	if(paypalExpressContainer.length) {
    		paypalExpressContainer = paypalExpressContainer[0];
    
    		// Disable/show the button
    		if(variationsFilled)
    			paypalExpressContainer.style.display = '';
    		else
    			paypalExpressContainer.style.display = 'none';
    	}
    }
    

    Sofern da irgendwo nen wurm drinnen ist einfach schreiben, ich fixe und update dann den Code hier (soweit lief aber alles 1A)

    • This reply was modified 6 years, 7 months ago by petschko.
    • This reply was modified 6 years, 7 months ago by petschko.

    @cedus @aweissinpsyde
    Der Code ist zwar noch nicht geschrieben, da ich leider durch so ne SEO Knalltüte gezwungen bin andere Sachen im moment zu machen. Denke aber morgen hab ich den Code, das ist nur nen mini JS-Script, vielleicht kann man auch einfach die selbe CSS-Klasse auf den PPE-Button legen und das WooCommerce-Script deaktiviert dann den Button mit, noch nicht genauer angesehen, kann ich aber gerne morgen machen (ich brauch es ja auch)

    Thread Starter petschko

    (@petschko)

    Ärgerlich, leider wird man hier gerne abgewimmelt mit “Paypal will das so”, sodass man sich selbst nen Hotfix-Script schreiben muss, ich kann dies gerne teilen wenn ich dazu komme

    Ansonsten erst mal überall Default-Werte einstellen (nervig aber kann auch helfen bei wenig Produkten)

    • This reply was modified 6 years, 7 months ago by petschko.

    Das Problem ist selbes wie bei mir: https://wordpress.org/support/topic/pp-express-fehlende-angaben-im-variables-produkt/

    Es kann doch nicht sein, dass der Kunde ein Produkt kaufen kann, ohne dass er eine Option auswählt (zb größe/farbe/whatever)

    Paypal-Express erlaubt dies (während der normale Kaufen Button deaktiviert ist) aber, wie ich bereits geschrieben habe sollte es nicht so sein.

    Ihr meintet Paypal will das so, was ich aber nicht verstehen kann. Am ende hat der Shop-Betreiber Probleme wegen fehlenden Angaben oder wie hier sogar fehlerhafter Preise des Eltern-Artikels

    @cedus du kannst den Status des Supportes auch wieder auf “Nicht gelöst” stellen, dies geht rechts~

    • This reply was modified 6 years, 7 months ago by petschko. Reason: Typos
    • This reply was modified 6 years, 7 months ago by petschko. Reason: Added mention
    Thread Starter petschko

    (@petschko)

    Was ist jetzt hiermit?

    Thread Starter petschko

    (@petschko)

    Vielen dank für die Antwort^^

    Leider ergibt sich mir hier der Sinn nicht, weswegen man zb nen T-Shirt ohne Angabe zb der Farbe/Größe kaufen kann? Also mit dem Script kann ich dies selbst verhindern, leider verstehe ich nicht weswegen man Produkte mit fehlenden Angaben zum kauf freigibt. Dies scheint nicht ganz durchdacht seitens PP. Am ende muss der Shopbetreiber hinterher telefonieren

    Forum: Reviews
    In reply to: [Gutenberg] Needs work.
    petschko

    (@petschko)

    @mjslabosz
    I think the argument is “ALL People should easily style their pages”, but that Editor is too complicated/unintuitive, so it does not make it easier.
    Even not for people who don’t have basic HTML knowledge, in the time they waste learning Gutenberg, they could learn basic HTML (which can used also outside WP)

    So the whole Project does not make sense

    petschko

    (@petschko)

    I recommend not to update this plugin without testing it yourself, since the Plugin-Devs don’t seem to test it properly. (Its not the first time)
    We had this problem more often in the past with this plugin, also we added Fallback Payment-Methods (like normal PayPal), to ensure most of the customers are able to pay even without this PayPal-Plus Plugin.

    We usually wait some days after an update and watch the support threads here

    petschko

    (@petschko)

    I recommend to check this file, in my file the first PHP-Statement is namespace WCPayPalPlus; which is correct.

    If there is anything else in this PHP-File before the namespace you should figure out what is modifying this file (normally nothing should/need to change this file)

    Thread Starter petschko

    (@petschko)

    Loading time is not much so it will not create an issue here. Load the script after opt-out may be not a good idea but it will not send any data in GA that’s more important.

    Understandable! Yes that’s true it does not send any data to GA!

    We’ll consider your suggestion & try to apply it in the future release.

    Thank you =)

    Thread Starter petschko

    (@petschko)

    We decided to still use this Plugin, also we still want to use an Opt-In, so we created this using the “OptOut” method to “hack” into it via the functions.php

    
    /**
     * Creates an GA-OptIn for the User to prevent tracking unless they allow this
     */
    function gaOptIn() {
    	$optOutCookieName = 'ga-disable-UA-xxxxxxxx-x';
    	$optOutCookie = (! isset($_COOKIE[$optOutCookieName])) ? false : $_COOKIE[$optOutCookieName];
    
    	if(! isTrackingAllowed() && ! $optOutCookie)
    		setcookie($optOutCookieName, 'true', time() + 307584000); // Add the opt-out cookie to simulate an opt-in
    	else if(isTrackingAllowed() && $optOutCookie)
    		setcookie($optOutCookieName, '', 0); // Remove cookie if tracking is now allowed
    }
    add_action('init', 'gaOptIn');
    
    

    We basically create the Out-Out Cookie by default on the user device, once they allow us to track them, we delete the opt-out cookie =)

    And with that solution we have an Opt-In for this Plugin, just wrote it here in case someone else want an Opt-In for this Plugin~ This function need to be called before any HTML output

    PS: The isTrackingAllowed() function is basically the source wherever you get value if the User allows tracking or not.
    In our case its a mix of getting the DoNotTrack-HTTP-Header and if the user itself allow us to track them~

    • This reply was modified 7 years ago by petschko.
Viewing 15 replies - 31 through 45 (of 92 total)