cardboardmonet
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Contact Forms] Pull logged in username?I was hoping to have it submitted with their form, but without them having to enter the username themselves. So, if they’re logged in, it’s automatically send along with the fields.
For someone who doesn’t write PHP scripts, can you help with the exact code that needs to be added to core/um-actions-register.php?
Forum: Plugins
In reply to: [WooCommerce] Code to display each product's category?I found the code for those who might be looking. Add this to your functions file:
global $post; $terms = get_the_terms( $post->ID, 'product_cat' ); foreach ($terms as $term) { $product_cat_id = $term->term_id; break; }
And then this tag wherever you want the categories to appear:
<?php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->ID, 'product_cat' ) ), 'woocommerce' ) . ' ', '.</span>' ); ?>
Forum: Plugins
In reply to: [WooCommerce] Code to display each product's category?Hi Mike,
I think I figured out how this get_the_term_list works, but it’s pulling blog posts categories, and I need it to pull the category each specific product is listed in. Can you please advise?
Thank you!!
Forum: Plugins
In reply to: [WooCommerce] Code to display each product's category?Thank you, Mike. I’m not a php developer by any means. I don’t need a custom shortcode, since this is going in a template file, but I’m not sure which variable to use in the get_the_term_list. Would you be able to point me in the right direction?
Thank you!!
Forum: Plugins
In reply to: [Contact Form DB] Google Live data: shown as text not values in cellsI, too, am having this error and haven’t made any changes to the code. It has been working for weeks, and then when I logged in today all the column fields are shown in one cell.
Any suggestions?
Thank you!
Forum: Plugins
In reply to: [Contact Form DB] CFDB Google Spreadsheet Live Data not linking (CFDB 2.8.3)I’m also experiencing an error after updating the plugin. The URL works when logged in, and I successfully download the file. Unfortunately when I put the code in Google Spreadsheets this error appears:
<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /wp-admin/admin-ajax.php could not be found on this server.</p>
</body></html>Forum: Plugins
In reply to: [Contact Form DB] WordPress to Google Drive Spreadsheet, Step-By-Step@dick Norise—
What’s going on? The steps I’ve highlighted should work if you follow them to a “T.”
Forum: Plugins
In reply to: [Contact Form DB] WordPress to Google Drive Spreadsheet, Step-By-StepHmm… then I can only assume there’s something wrong with your script that’s not signing Google Drive in to your WordPress admin correctly. I’d play around with that. Without seeing all the code, and having the ability to get in there myself, I can’t say for sure, though.
Forum: Plugins
In reply to: [Contact Form DB] Change posting order (ascending vs descending data)Figured it out!
If you’re hardcoding your CSV URL as such:
https://my-domain.tld/wp-content/plugins/contact-form-7-to-database-extension/export.php?form=myform
You simply have to add:
&orderby=Submitted%20ASC
To the very end, so the final URL will look like:
https://my-domain.tld/wp-content/plugins/contact-form-7-to-database-extension/export.php?form=myform&orderby=Submitted%20ASC
If you put your information in where things are italicized, and are logged in to your WordPress admin, you can test this by navigating to that link in your browser. It should start a CSV download, and then you can open that in excel and it should order ascending.
Forum: Plugins
In reply to: [Contact Form DB] Change posting order (ascending vs descending data)Update: I need it in ascending order. At least I figured that much out.
Forum: Plugins
In reply to: [Contact Form DB] Google Live Data Solution is hereI’m glad my post could help! At the moment I’m trying to get the new entries to appear at the bottom of the spreadsheet (opposed to the top). If you have any insight into how to get this to work, please let me know! I’ll be playing around with it a bit.
Forum: Plugins
In reply to: [Contact Form DB] WordPress to Google Drive Spreadsheet, Step-By-StepWhen you click that URL (and are logged in to your WordPress account), does it retrieve the data, either on the page or with a download? I can’t test it, because I don’t have admin access to your WordPress (obviously), but if that doesn’t work, you either have a URL error or login error. I think.
Forum: Plugins
In reply to: [Contact Form DB] WordPress to Google Drive Spreadsheet, Step-By-StepOne final update (I hope)! To update almost automatically (this’ll add a “REFRESH” button in your menu which you have to hit to refresh data):
function onOpen() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); var entries = [{ name : "Refresh", functionName : "refreshLastUpdate" }]; sheet.addMenu("Refresh", entries); }; function refreshLastUpdate() { var fresh = SpreadsheetApp.getActiveSheet().getRange('RANDOM VARIABLE CELL').getValues(); SpreadsheetApp.getActiveSpreadsheet().getRange('A1').setValue('=CF7ToDBData("YOUR URL", "FORM NAME", "", "USER NAME", "PASSWORD", "' + fresh + '")'); }
Add this to an out-of-the-way or hidden cell:
=RANDBETWEEN( 1 ; 999 )
And then whatever cell you’ve added that to, make sure you change the RANDOM VARIABLE CELL variable in the above code.
This obviously isn’t the cleanest way to do what I’m looking to do (I’m no programmer), but it has helped me, and maybe someone with more experience can clean it up.
Forum: Plugins
In reply to: [Contact Form DB] WordPress to Google Drive Spreadsheet, Step-By-StepSomewhat fixed this error, but probably did so incorrectly. In the Script Editor, I hard-coded the path to my export (since I knew it was working):
On line 62
var url = "https://my-domain.tld/wp-content/plugins/contact-form-7-to-database-extension/export.php?form=myform";
You can test the URL in your browser, and if a download starts you know you have the right path (make sure you’re already logged in).
In the spreadsheet, fill out this request same as before:
=CF7ToDBData("https://my-domain.tld", "form-name", "", "user", "pwd")
And it should work. At least, I got it to work.
Hopefully this helps someone else!