urgul
Forum Replies Created
-
Hi @cssultan , it’s working fine now, thank you.
And sorry for the delay – I was on a vacation.
I’d love to give you 5 stars, but I’m waiting for a feature for the customer to log in and/or reset their password without leaving the funnel. This is a key feature for me. With this WPFunnels will be a complete product that will fully deserve 5 stars and even more! For now, the lack of this capability is quite annoying (and creates unnecessary confusion) for both me and my returning customers.
Hi @cssultan , it’s been a while, so I’d like to ask. Do you have any ETA for this feature? This is really crucial for UX, especially when a customer wants to buy another product using the same email address he/she used for a previous purchase (so he/she already have a customer account).
Hi @cssultan, sorry for the delay – I was on vacation.
I found a solution of this issue. I added this php snippet:
add_filter( 'woocommerce_checkout_get_value', 'uncheck_billing_vat_on', 10, 2 );
function uncheck_billing_vat_on( $value, $input ) {
if ( $input === 'billing_vat_on' ) {
return '';
}
return $value;
}and changed the snippet with VAT validation:
// Zapisujemy stan checkboxa w sesji
add_action('woocommerce_checkout_process', 'save_vat_checkbox_state');
function save_vat_checkbox_state() {
WC()->session->set('billing_vat_on', isset($_POST['billing_vat_on']) ? true : false);
}
// Modyfikujemy funkcj? waliduj?c? NIP
add_filter('woocommerce_checkout_posted_data', 'sanitize_and_validate_billing_vat_number');
function sanitize_and_validate_billing_vat_number($data) {
$billing_vat_on = WC()->session->get('billing_vat_on');
if ($billing_vat_on) {
$billing_vat_number = isset($data['billing_vat_number']) ? $data['billing_vat_number'] : '';
// Je?li pole NIP jest puste, nie dodajemy b??du
if (empty($billing_vat_number)) {
return $data;
}
// Usuwa spacje i my?lniki z numeru NIP
$billing_vat_number = str_replace([' ', '-'], '', $billing_vat_number);
// Sprawdza, czy numer NIP ma 10 cyfr
if (!preg_match('/^[0-9]{10}$/', $billing_vat_number)) {
wc_add_notice(__('<strong>Podany numer NIP jest niepoprawny.</strong> Wpisz polski numer NIP bez spacji i my?lników.', 'woocommerce'), 'error');
} else {
// Wylicza sum? kontroln?
$weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
$sum = 0;
for ($i = 0; $i < 9; $i++) {
$sum += $billing_vat_number[$i] * $weights[$i];
}
$control_number = $sum % 11;
// Sprawdza, czy suma kontrolna jest poprawna
if ($control_number != $billing_vat_number[9]) {
wc_add_notice(__('<strong>Podany numer NIP jest niepoprawny.</strong> Wpisz polski numer NIP bez spacji i my?lników.', 'woocommerce'), 'error');
} else {
// Zapisuje przefiltrowan? warto?? pola "billing_vat_number"
$data['billing_vat_number'] = $billing_vat_number;
}
}
}
return $data;
}
// Dodajemy akcj? czyszczenia sesji po zakończeniu zamówienia
add_action('woocommerce_thankyou', 'clear_vat_session');
function clear_vat_session() {
WC()->session->__unset('billing_vat_on');
}
add_action('wp_ajax_update_vat_checkbox', 'update_vat_checkbox_session');
add_action('wp_ajax_nopriv_update_vat_checkbox', 'update_vat_checkbox_session');
function update_vat_checkbox_session() {
WC()->session->set('billing_vat_on', ($_POST['state'] === '1'));
wp_die();
}I don’t know if it’s the best solution, but it works for now.
Would you like to get access to staging site to explore this?
Hi @cssultan
This is 100% feasible, see how FunnelKit solved this with Smart Login – this is exactly the solution I am asking you for. Both login and password change are done within the funnel. Such a solution would be amazing!
https://www.youtube.com/watch?v=g1m-QhKAL1s&ab_channel=FunnelKitHQ
I discovered that this problem is not related to Woocommerce FakturaXL, but to the WPFunnels checkout widget (Elementor) itself.
Explaining once again:
I have created additional fields in Checkout Field Editor for WooCommerce (Pro) for my checkout purposes:
- checkbox – “I want to receive an invoice”
- and 2 more fields – “company name” and NIP (VAT), which appear only when “I want to receive an invoice” is checked, and hide when uchecked.
The problem is that the first time I check the box “I want to receive an invoice” and enter an invalid NIP number, the code that validates its correctness works, but when I uncheck this checkbox and check it again, the validation no longer works (really strange behavior). This problem occurs regardless of whether the Woocommerce FakturaXL plugin is enabled or not, so it has nothing in common with it.
I’ll add that after the WPFunnels checkout page loads, all I have to do is check the checkbox “I want to receive an invoice”, uncheck it and check it again and then enter the wrong NIP (VAT) and the validation no longer works.
To sum up – after checking the checkbox “I want to receive an invoice” for the first time and entering the wrong NIP, the validation works, after unchecking the checkbox and checking it again the validation no longer works.
I should add that in the standard Elementor checkout widget this problem does not occur – the snippet validates the correctness of the NIP (VAT) field always, no matter how many times I check or uncheck the checkbox “I want to receive an invoice”.
So the problem is with WPFunnels.
Hi @cssultan,
Thanks, it would be great if you could solve this problem, as it is quite problematic and very bad for UX.
In addition, after resetting the password, the customer can go to the shopping cart in the store (not in the funnel), where he/she will find the product added in the checkout step in the funnel, but there he/she will no longer receive the discount that is set in the WPFunnels funnel in the checkout step. This is an additional problem that should be fixed.
Forum: Plugins
In reply to: [Code Snippets] Could not create snippet. Request failed with status code 406The problem has been solved. Modsec was blocking the request.
- This reply was modified 5 months, 4 weeks ago by urgul.
Hi @emma24,
Thank you for responding so quickly. Unfortunately, the solution you provided via email does not solve the problem. I have sent you a reply with some additional details.
Regards.
Why have you marked this issue as resolved when it is NOT? It took you over 1 month to reply and all you can say is “this is a bug, try using a previous version of the plugin”? Ridiculous! Fix your plugin first because it causes issues.
Forum: Plugins
In reply to: [Happy Addons for Elementor] Justified Grid widget cuts off portrait imagesForum: Plugins
In reply to: [Happy Addons for Elementor] Justified Grid widget cuts off portrait imagesGreat news! Thank you ??
Could you add a feature to set different image height for desktop, tablets and mobile, too? This feature would be great (I wouldn’t have to set different galleries for different devices)?
- This reply was modified 2 years, 5 months ago by urgul.
Great news! Thank you ??
Could you add a feature to set different image height for desktop, tablets and mobile? This feature would be great (I wouldn’t have to set different galleries for different devices)?
- This reply was modified 2 years, 5 months ago by urgul.
Why this thread is marked as resolved?
I agree with bbuerger!
With the latest update the Justified Grid is messed up! Revert back to how it was before the update or add the option of fixed height. I’ve multiple pages with Justified Grid on and all of them are messed up now! ??
- This reply was modified 2 years, 5 months ago by urgul.
Plugins versions:
WP Social Ninja 3.5.4
Elementor 3.6.2
Elementor Pro 3.6.4