seanyscon
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Modify woocommerce Search pageHi
How can I do that programettically? Thank you
Hi
It is a custom button I added to some products, via the functions.php script. The code is:
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_custom_sale_text', 10 ); add_action( 'woocommerce_before_single_product_summary', 'woocommerce_custom_sale_text', 10 ); function woocommerce_custom_sale_text() { global $post,$product; if ( ! $product->is_in_stock() ) { echo '<div ' ; echo 'class="openPopUp wd-buy-now-btn button alt add_to_cart_button ajax_add_to_cart add_no_loop" '; echo 'style="background-color:rgba(255,255,255,0.75);color:rgb(255,153,0); position: absolute;top: 10%; left: 50%;transform: translate(-50%, -90%);-ms-transform: translate(-50%, -90%);'; echo 'border: 4px solid;border-color:rgb(255,153,0);border-radius:10px;">'; echo '<i class="fa fa-bell" aria-hidden="true"></i> Verfügbarkeitsalarm</div>'; echo '<div id="popup" class="popup" style="display:none;position:absolute;top:50%;left:50%;';//transform:translate(-50%, -05%);'; echo 'z-index:10000;background-color:#FDFDFD;width:1000px;padding:20px;border: 4px solid;border-color:rgb(255,153,0);border-radius:5px;" onclick="event.preventDefault();event.stopPropagation();">' ; echo '<p onclick="event.preventDefault();event.stopPropagation();">M?chten Sie benachrichtigt werden, wenn dieses Produkt wieder auf Lager ist?</p>'; // Text $params = apply_filters( 'woocommerce_bis_front_end_params', array( 'version' => WC_BIS()->get_plugin_version(), 'wc_ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ), 'registration_form_nonce' => wp_create_nonce( 'wc-bis-registration-form' ) ) ); echo '<input type="hidden" class="cwg-security" name="cwg-security" value="' . /*wp_create_nonce('codewoogeek-product_id-' . $product)*/ '5e167eac74' . '"/>'; echo '<input type="hidden" class="cwg-productID" name="cwg-productID" value="'. $product->get_id() . '"/>'; echo '<input type="hidden" class="cwg-ajaxURL" name="cwg-ajaxURL" value="' . '/?wc-ajax=%%endpoint%%&elementor_page_id=' . $product->get_id() . '"/>'; if ( ! (is_user_logged_in()) ) echo '<input class="cwg-email" name="cwg-email" type="text" placeholder="Enter your e-mail" onclick="event.preventDefault();event.stopPropagation();">'; echo '<button class="button" type="button" onclick="submitData_frompopUP();">'; echo 'Ja </button>'; echo '</div>'; } }
Functions.php has enqueued my own script file, script.js. My goal is to define the submitData_frompopUP(); function in the file script.js, such that when the onclick action is triggered, the content of the cwg-email item will be submitted to the plugin, along with the product id, so that once the product is back in stock, an email will be sent to this email.
Alternative : I want to bind the register email for when a product is back instock functionality to a custom button, as above.
Thank you.
Forum: Plugins
In reply to: [LiteSpeed Cache] Pages are still cached after deleted litespeed via SSHRight now, as i said, I reinstalled, purged and deactivated the plugin.
However, before I did that the following happened:I have a page open which calls upon a template, and if i made any changes in the template + php therein, it will not be reflected in the browser, even if i clear browser cache, clear wp cache, and i will see in the open page’s source, that page was generated by litespeed at an older time.
But if i opened a different page, also calling on same template + php as in the previous one, the changes would be reflected immediately.
AFter I reinstalled, purged and deactivated litespeed, this problem went away.
Forum: Plugins
In reply to: [LiteSpeed Cache] Pages are still cached after deleted litespeed via SSHI checked every .htaccess file on the server, after logging in with SSH, but there is nothing.
Specifically i looked for LSCACHE and LSCS keywords. But I did not find those regions in any of the .htaccess files (the global one in servers root directory, and the one in the domain root and there was also another in the plugin directory)
Forum: Plugins
In reply to: [LiteSpeed Cache] Pages are still cached after deleted litespeed via SSHI can use cURL do send requests and get answers.
Forum: Plugins
In reply to: [LiteSpeed Cache] Pages are still cached after deleted litespeed via SSHI have done all of that already as well. That *uninstalled* the plugin, but did not clear the cache. That is the point of this post.
Forum: Plugins
In reply to: [LiteSpeed Cache] Pages are still cached after deleted litespeed via SSHHello
I reinstalled litespeed, purged and now deactivated it. I wanted to know a way to do the same over SSH and without having to log in to wordpress control panel.
Thank you.