deeveedee
Forum Replies Created
-
Will,
I converted a substantial page of html and php scripting to a single starting and ending [insert_php][/insert_php] with nested ending and starting ‘?>’ ‘<?php’ tags. Everything works fine. The only difference that I noticed is that I need to escape the ‘$’ character (replacing instances of ‘$’ with ‘\$’ in my html). I”m guessing the eval() preprocessor needs this. I find using ‘<?php ?>’ instead of ‘[insert_php] [/insert_php]’ easier to type and easier to read. I can’t say that I noticed a performance difference in the way the page updates.
Again, I’m a WordPress, HTML and PHP novice, so others should take that into consideration when reviewing this post, but it’s working for me.
Thanks again for a great plugin.
Will,
I’m a WordPress and PHP novice, so I know just enough to be dangerous and to get me in trouble (and to try things that probably shouldn’t work, but do). Below is a sample for you to try, with multiple PHP script blocks. In this example, the first and last PHP tags on this page use your [insert_php][/insert_php] shortcodes. The rest use standard ending and starting PHP tags. I’m using WP Version 4.4.2, PHP Version 5.4.45 and Version 1.3 of your plugin.
[insert_php] if (empty($_POST['survey'])) { $survey = 'A'; } else { $survey = $_POST['survey']; } ?> <h3>Choose your option</h3> <form action='#' method='post' id='testform'> <input form='testform' onChange='this.form.submit();' type='radio' name='survey' value='A' <?php if ($survey == 'A') { ?>checked='checked' <?php } ?> > A <input form='testform' onChange='this.form.submit();' type='radio' name='survey' value='B' <?php if ($survey == 'B') { ?>checked='checked' <?php } ?> > B </form> <h3 style='margin-top: 2em;'>You selected Option <?php echo $survey; [/insert_php] </h3>
Forum: Plugins
In reply to: [WC Fields Factory] How to access WC Fields Factory meta data in order itemHi again. You are correct – I apologize for misunderstanding your directions. I was incorrectly using the Field Name and not the Field Label. I am able to access some WC Fields Factory fields in the order item and not others. I’ll continue testing to let you know what I find. Thank you again for great support and a great plugin.
Forum: Plugins
In reply to: [WC Fields Factory] How to access WC Fields Factory meta data in order itemHi – thanks for the quick reply. I tried $item[‘my_field_label’], but that did not work either. I do not have ‘Fields Cloning’ enabled. Could that have something to do with it?
Forum: Plugins
In reply to: [WC Fields Factory] Hide custom fields in Order Details summarySark,
Nice work on the V1.2.5 update. Everything that I’ve tested is working fine for me with WC 2.5.2, WP 4.4.2, PHP 5.4.45. The only thing I’ve noticed (that I also saw in V1.2.4) is that I’m not able to change and re-save custom fields without losing my changes. I need to delete the custom field from its group and re-add it. Not a problem – just an inconvenience.
Thanks again for your hard work and great plugin!
Forum: Plugins
In reply to: [WC Fields Factory] Hide custom fields in Order Details summaryThank you for providing V1.2.5! I manually apply my plug-in updates to my server by unzipping them in the plugins directory (since I have configured apache with restricted permissions). When I attempted to apply the V1.2.5 update in this manner, the result was two installed WC Factory Fields plugins (V1.2.4 and V1.2.5). To manually upgrade to V1.2.5, I deactivated V1.2.4, deleted the V1.2.4 plugin directory and unzipped V1.2.5. I was then able to ‘hide’ meta data from the order page and e-mails.
Nice work! Thank you. I will start testing V1.2.5 now.
Forum: Plugins
In reply to: [WC Fields Factory] Is wccpf_delivery_date a reserved variable?I’m glad that you’re finding as much value in my feedback as I am in your plugin. It will be my pleasure to continue to offer suggestions and feedback. Your WC Fields Factory plugin is working well for me. Thank you.
Forum: Plugins
In reply to: [WC Fields Factory] Is wccpf_delivery_date a reserved variable?Hi, Saravana Kumar K,
I apologize for what was apparently a false alarm. I am unable to reproduce the problem. The “error” was a WordPress “white screen” that occurred when I attempted to save functions.php (requiring me to edit functions.php outside of WordPress to restore WordPress functionality). I have not been able to reproduce the error, so please disregard and delete this post.
Thank you again for your great support.
Forum: Plugins
In reply to: [WC Fields Factory] Change product image to reflect user selectionsUpdate to my previous post: To implement a “dynamic product image” that reflects the user’s product options, I have implemented a custom product page that shows the customized product to reflect user-selected product options. This custom product page includes an “Add to Cart” button that adds the customized product to the cart using the add_to_cart URL as follows:
https://example.com/cart/?add-to-cart=product_id&quantity=quantity&slug1=value1&slug2=value2
where slug1, slug2, etc. are WC Factory Fields field slugs. Note that my products are Simple Products.
Thank you for a great plugin.
Forum: Themes and Templates
In reply to: Top margin in theme headerHi bensita,
Thank you for your suggestion. It worked perfectly. I have removed ‘@import…’ from my child-theme’s style.css and inserted your code (above) to my child-theme’s functions.php.
Thank you very much for your help!
Forum: Themes and Templates
In reply to: Top margin in theme headerI think I found the problem – I’ll try to guess what’s happening, but please understand that I’m a WordPress novice. I had read that the proper way to ‘import’ the parent-theme’s style.css is to add the following to child-theme’s functions.php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); }
This functions.php technique worked when I was defining new styles that did not override parent-theme styles. It appears that this functions.php method did not work for overriding parent-theme styles.
If I remove the add_action( wp_enqueue_scripts’,…) from my child-theme’s functions.php and add
@import url("../parent-theme/style.css");
to the beginning of my child-theme’s style.css, the #navigation style change works when added to my child-theme’s style.css.
My guess is that this now works with @import… at the beginning of my child-theme’s style.css, because my child-theme’s style.css customizations are applied AFTER the parent-theme’s style.css is imported. I suspect that when I used the functions.php method (above) to import the parent-theme’s style.css, the parent-theme’s style.css was applied AFTER the child-theme’s style.css, thus losing any style overrides in the child-theme.
Does that make sense?
Forum: Themes and Templates
In reply to: Top margin in theme headerHi, stephencottontail.
Thank you for pointing this out. I have tried both .navigation and #navigation. In both cases, the navigation margin remains unchanged. So far, the only way that I have found to change the margin is to edit the header.php as indicated in my previous post. Any other guesses?
Thank you very much for your help.
Forum: Themes and Templates
In reply to: Top margin in theme headerHi, bensita.
Yes – I do have a style.css in my child-theme; however, I am unable to share a link, because the site is not yet public. I’m sorry that I can’t actually provide a link at this time. style.css in my child-theme is very simple and is working correctly to change the style of other objects in my WordPress site. The full header.php section that I am attempting to modify is below (including my margin-top modification).
Thank you very much for your help.
<section style="margin-top: 30px;" id="navigation" class="twelve columns"> <nav id="nav-wrap"> <?php wp_nav_menu( array( 'container' => 'ul', 'menu_class' => 'sf-menu', 'menu_id' => 'topnav', 'depth' => 0, 'sort_column' => 'menu_order', 'fallback_cb' => 'false', 'theme_location' => 'mainmenu' )); ?> </nav><!-- nav --> <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <div class="bgsearch"> <input type="text" name="s" id="s" onfocus="if (this.value == '<?php _e( 'Search', 'dessky' ); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search', 'dessky' ); ?>';}" value="<?php _e( 'Search', 'dessky' ); ?>" /> <input class="searchbutton" type="submit" value=""> </div> </form> <div class="clear"></div> </section>
Forum: Plugins
In reply to: [WC Fields Factory] Editing item, values lost from fields.Saravana Kumar K,
After further testing, it appears to me that I do not need ‘Fields Cloning’ enabled. Could you please explain when ‘Fields Cloning’ needs to be enabled? My configuration details are as follows:- All of my WooCommerce products are ‘Simple Products’ with custom fields defined in WC Fields Factory
- WC Fields Factory ‘Fields Cloning’ is unchecked (disabled)
- In WooCommerce Settings, ‘Redirect to cart after successful addition’ is checked (enabled)
- I am using my own ‘Add to Cart’ button with the ‘add_to_cart’ URL to add my Simple Products with WC Fields Factory custom fields to the cart
-
Thank you again for your help.
Forum: Plugins
In reply to: [WC Fields Factory] Editing item, values lost from fields.Hi, Saravana Kumar K,
Thanks for your quick reply. I have confirmed that my technique does not work properly when ‘Fields Cloning’ is enabled. It appears to me that ‘Fields Cloning’ must be enabled to allow updating item quantities in the cart – is that correct? My observation is that, without ‘Fields Cloning’ enabled, updating an item quantity in the cart results in the addition of a new item in the cart.
Thank you very much for your help, your excellent support and for your great plugin.