rasidrsd
Forum Replies Created
-
So you dont know how the total cart discount value (image – 0,00€) is saved?

- This reply was modified 9 years, 1 month ago by rasidrsd.
Hey Pablo, thanks for your answer.
Meanwhile I solved the issue:
/*Checkout Felder anordnen*/ add_filter("woocommerce_checkout_fields", "rsd_order_fields"); function rsd_order_fields($fields) { $order = array( "billing_first_name", "billing_last_name", "billing_company", "billing_wcj_checkout_field_1", "billing_country", "billing_state", "billing_postcode", "billing_city", "billing_address_1", "billing_address_2", "billing_email", "billing_phone" ); foreach($order as $field) { $ordered_fields[$field] = $fields["billing"][$field]; } $fields["billing"] = $ordered_fields; return $fields; }You can just change the array and switch the fields as you like.
Forum: Plugins
In reply to: [WooCommerce] Discount only for AdminI solved it:
I installed the Plugin “Woo Discount Admin Backoffice”.
It allows you to give discoint in the WooCommerce Order Admin Panel.In my case, I use the Hook one the “Save Order” Button to trigger my function.
Forum: Plugins
In reply to: [WooCommerce] “Save Order” HookI found it.
It’swoocommerce_order_actions_end.I used the Plugin ‘Simply Show Hooks’
Forum: Plugins
In reply to: [WooCommerce] “Save Order” HookThanks for the quick reply.
It seems that the website you suggested is not reachable….
Forum: Plugins
In reply to: [WooCommerce] Discount only for AdminBecause I have a function that triggers if a order is placed. This just works through the frontend. And this function is required for something else.
Automatic discount doesnt work, beacuse there is no regularity/rules for them to be applied.
Is there no “if user = admin; create field”? Thats everything I need. Then in the backend I could simply get the variable from this field and calculate the total.
Forum: Plugins
In reply to: [WooCommerce] Second shop pageThanks for the answer.
I cant find a shortcode for the “all Porducts” PageForum: Plugins
In reply to: [WooCommerce] Get Zone NameHey lorro,
thank you for your help.
I did it like this:
$shipping_items = $order->get_items( 'shipping' ); foreach($shipping_items as $rsd){ $order_shipping_method_id = $rsd['method_id'] ; }And then later:
if(strpos($order_shipping_method_id, "flat_rate:1")!==false){ //do something }Thank you.
Forum: Plugins
In reply to: [WooCommerce] Get Zone NameHey lorro,
thank you for your help.
I did it like this:
$shipping_items = $order->get_items( 'shipping' ); foreach($shipping_items as $rsd){ $order_shipping_method_id = $rsd['method_id'] ; }And then later:
if(strpos($order_shipping_method_id, "flat_rate:1")!==false){ //do something }Thank you.
- This reply was modified 9 years, 2 months ago by rasidrsd.
Forum: Plugins
In reply to: [WooCommerce] Get Zone NameI have tried your code, it works perfectly, but I noticed my assumption was wrong.
get_zones has all possible zones, not only the selected one (by selected I mean that when the customer enters his adress, it selects the zone automatically (tested, works)).How can I get just the selected Zone?
Forum: Plugins
In reply to: [WooCommerce] Remove “Sort by Price”Alright, thank you.
I’ll try to get some answers in the Enfold Forum.Forum: Plugins
In reply to: [WooCommerce] Remove “Sort by Price”Yes, it works perfectly with Storefront.
I am using a purchased theme “Enfold by Envato”.
So I can’t remove it? Maybe by adding the Filter anywhere?Forum: Plugins
In reply to: [WooCommerce] Remove “Sort by Price”Priority 99 doesn’t work.
The var_dump array is not displayed. So how can I override the Theme?Forum: Plugins
In reply to: [WooCommerce] Continue if with 2 AttributesSo the problem is, that when the first “Color” enters the “if” statements, all the other colors would draw a line, so if the second “color” gets to the “if” it doesnt write the line, but the previous one did, so it looks that nothing happens.
How can I solve this problem?Forum: Plugins
In reply to: [WooCommerce] Continue if with 2 AttributesI use the FPDF library to generate pdf files and write on them.
if (strpos($variation,"black")===false){ $pdf->Line(150,129,202,129); $pdf->Line(150,133,165,133); }Simply: If “black” is selected write lines.
But if two Colors are selected it does only the first “if”, the other one doesnt write anything.- This reply was modified 9 years, 3 months ago by rasidrsd.