custom-fields

WordPress: How to get metadata of Custom Fields from Custom Taxonomy with using jQuery

▼魔方 西西 提交于 2019-12-11 11:10:43
问题 I have added Custom Post Fields (a list of check-boxes) to the Custom Taxonomy 'product_cat'. Also I have a drop-down with this Custom Taxtonimies ('product_cat') on my Custom Post Type ('product') Add/Edit page. How I can get a metadata from these Custom Fields with using jQuery when the Custom Taxonomy drop-down was changed? <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#prodcatoptions').change(function() { var productsubcut = jQuery('#prodcatoptions').val();

Custom cart item price calculation based on dimentions custom fields in Woocommerce

一曲冷凌霜 提交于 2019-12-11 10:12:16
问题 I have created some input custom fields in woocommerce single product pages where user can input height and width values respectively… When product is added to cart that custom fields values are displays in cart and checkout page too. Example: if user input height='15' and width='20' then its display is cart page like height=15 width=20 single product page cart page Now what Iém trying to achieve is to make a custom price calculation based on that "height" and "width" custom fields values:

Woocommerce Emails - Sending multiple emails based on product count

空扰寡人 提交于 2019-12-11 08:46:18
问题 In Woocommerce, I have a Course product that uses WC Fields to collect student[s] names and email addresses, and custom email template that sends an email when this course product is purchased. As of now, based on the answer in this thread, I am able to collect the email addresses added to those custom fields and send one email to each student as a BCC recipient. I am now trying to have the emails include the student's name and email address in the body of the email, but I do not want all of

How do I sort by a custom field without manually creating a new page?

烈酒焚心 提交于 2019-12-11 08:25:48
问题 Having a bit of an issue with Wordpress here. In all honesty I've always designed my sites from scratch and "coded" from the ground up. Lately I've been trying to work with WP as I've heard good things about it. It would appear that WP gives you many things for free (e.g. dynamic "pages" based on CATEGORIES). However, I would like to know how to manipulate these freebies without reinventing the wheel. For example, I would like to have my SUB-MENU display a list of post categories. But I would

Word 2010 can Field added via QuickParts be given an ID and later referenced in document.Fields collection

百般思念 提交于 2019-12-11 07:56:53
问题 I need to add a few fields to a Word 2010 DOTX template which are to be populated automatically with custom content at "run time" when the document is opened in a C# program using Word Interop services. I don't see any way to assign a unique name to "Ask" or "Fill-In" fields when adding them to the template via the QuickParts ribbon-menu option. When I iterate the document.Fields collection in the C# program, I must know which field I'm referencing, so it can be assigned the correct value. It

Custom checkbox in product settings that displays a custom field when checked

落花浮王杯 提交于 2019-12-11 07:29:14
问题 I am currently working on a WordPress eCommerce website, using WooCommerce. I have created a custom Checkbox within the Product edit pages general settings. I have also a code snippet that is displaying a custom text field in single product pages. Now I would like when this custom Checkbox is checked for a product (in it's settings), to display this custom text field in single product pages. The Coding I have so far: To create the Checkbox, within the WooCommerce Product Dashboard, I have

Add a custom payment gateway with additional radio buttons in Woocommerce

梦想的初衷 提交于 2019-12-11 06:26:40
问题 I am developing a custom payment method for woocommerce follogin is my code : class WC_Gateway_Custom extends WC_Payment_Gateway { public $domain; /** * Constructor for the gateway. */ public function __construct() { $this->domain = 'custom_payment'; $this->id = 'custom'; $this->icon = apply_filters('woocommerce_custom_gateway_icon', ''); $this->has_fields = false; $this->method_title = __( 'Custom', $this->domain ); $this->method_description = __( 'Allows payments with custom gateway.',

Odoo - How to add “code” field to Accounting Model

删除回忆录丶 提交于 2019-12-11 05:48:52
问题 I am working on a module that will print some values related to the invoice. The only two things that are missing in the Accounting Model are fields: -vat -code (Country Code) I have successfully added vat field. However, get an error when trying to bring the "code" field. My py code is as follows: from openerp import models, fields class CountryCodeInvoice(models.Model): # where to place new fields _inherit = 'account.invoice' # getting country code to the accounting model code = fields.Char

Woocommerce: Customizing the availability of a category

血红的双手。 提交于 2019-12-11 05:20:55
问题 I have many products nested within parent categories in WooCommerce. I want to be able to apply a custom field where I can specify a time availability for categories as a admin feature only in Back end. Theory: Back end - On each parent category I will have this custom field where I can type or choose a time frame : for example 11:00-17:00 . Front end: During this time frame , users will be able to browse all the products within that category. Outside of this time frame all the products

Retrieving the label name for a custom fields in backend product tabs

落爺英雄遲暮 提交于 2019-12-11 04:45:38
问题 Below is the WooCommerce Custom Product with custom field, custom tab and it's content: I'm sampling the first text field at this tab. Goal is to get the "label" property of these fields. function launch_product_tab_content() { global $post; ?><div id='launch_contents' class='panel woocommerce_options_panel'><?php ?><div class='options_group'><?php woocommerce_wp_text_input( array( 'id' => '_text_announced', 'label' => __( 'Announced(Global)', 'woocommerce' ), 'desc_tip' => 'true',