SteveHale
Forum Replies Created
-
Hi Michel
Yes that worked but it also added a blank line at thrid position again, whereas gtin came in correct alphabetical place.
I did download your plugin but the only drage with your plugin is that it has no ability for brand sorting, brand images and so on…..
Any ideas about the product brands from the BRocket plugin?
Cheers
Steve B
Hi Yes sorry I only put up part of the code. As I thought this woudl be enough. I’ve checked the data base files and they show that _gtin is the field title for the EAN codes. The database also shows the field for the brands as _berocket_brands but when I enter this in your variables it does not show.
Here is the full GTIN code from the functions.php file:-
/**
* Adding Custom GTIN Meta Field
* Save meta data to DB
*/
// add GTIN input field
add_action(‘woocommerce_product_options_inventory_product_data’,’woocom_simple_product_gtin_field’, 10, 1 );
function woocom_simple_product_gtin_field(){
global $woocommerce, $post;
$product = new WC_Product(get_the_ID());
echo ‘<div id=”gtin_attr” class=”options_group”>’;
//add GTIN field for simple product
woocommerce_wp_text_input(
array(
‘id’ => ‘_gtin’,
‘label’ => ‘GTIN’,
‘desc_tip’ => ‘true’,
‘description’ => ‘Enter the Global Trade Item Number (UPC,EAN,ISBN)’)
);
echo ‘</div>’;
}
// save simple product GTIN
add_action(‘woocommerce_process_product_meta’,’woocom_simple_product_gtin_save’);
function woocom_simple_product_gtin_save($post_id){
$gtin_post = $_POST[‘_gtin’];
// save the gtin
if(isset($gtin_post)){
update_post_meta($post_id,’_gtin’, esc_attr($gtin_post));
}
// remove if GTIN meta is empty
$gtin_data = get_post_meta($post_id,’_gtin’, true);
if (empty($gtin_data)){
delete_post_meta($post_id,’_gtin’, ”);
}
}The meta key _gtin is being stored in the postsmeta table, as is the meta key _yoast_wpseo_primary_berocket_brand, if that is any help? π
I’ve also done a search in the database for the terms gtin and brands and the main entries for both appear to be in the postsmeta table.
I’m probably just getting myself lost now!!
Cheers
Steve
Hi Auke
I have tried adding _gtin% and/or _gtin to the 3rd party attributes in your plugin. Then in the drop down list I now get a blank line in approx third place.
I still can’t find what to use for the brands plugin.
Regards
Steve BHi Auke
Thanks but it is not clear to me where to find these Third Party Attributes. The GTIN field is generated using code in the functions.php file. The brands are generated by the Brands for Woocommerce by BeRocket plugin.
The code for the GTIN is:-
// save simple product GTIN
add_action(‘woocommerce_process_product_meta’,’woocom_simple_product_gtin_save’);
function woocom_simple_product_gtin_save($post_id){
$gtin_post = $_POST[‘_gtin’];
// save the gtin
if(isset($gtin_post)){
update_post_meta($post_id,’_gtin’, esc_attr($gtin_post));
}
// remove if GTIN meta is empty
$gtin_data = get_post_meta($post_id,’_gtin’, true);
if (empty($gtin_data)){
delete_post_meta($post_id,’_gtin’, ”);
}
}Is the attribute you mention for the GTIN _gtin% ?
I am not sure where to find the attibute for the Brands.
Regards
Steve BForum: Plugins
In reply to: [Timely All-in-One Events Calendar] Extended Views options do not showHi All
Eventually I sorted the problem. Something went “pear shaped” when I uninstalled and re-installed, three of the theme folders were pretty much empty.
Also the uninstall did not remove the “Calendar” page, so each time I did a re-install a new one was created, seemingly leaving the problem on the page as the plugin defaults to a page “Calendar”. It does not know which one to use if a re-install is carried out and the new page is created.
Also I would like to thank the very nice lady that called me from the US, it was very thoughtful and I appreciate the call, even though by then I had sorted the issue.
I also apologise to her for not thanking her properly. I was in the middle of cooking a BBQ and watching a Virgin Atlantic hot air balloon lose height so rapidly over our house that both the neighbour and I thought we were going to have to rescue a body or two!
Cheers
SteveBForum: Plugins
In reply to: [Timely All-in-One Events Calendar] Events Is Driving me Crazy!Hi All
Eventually I sorted the problem. Something went “pear shaped” when I uninstalled and re-installed, three of the theme folders were pretty much empty.
Also the uninstall did not remove the “Calendar” page, so each time I did a re-install a new one was created, seemingly leaving the problem on the page as the plugin defaults to a page “Calendar”. It does not know which one to use if a re-install is carried out and the new page is created.
Also I would like to thank the very nice lady that called me from the US, it was very thoughtful and I appreciate the call, even though by then I had sorted the issue.
I also apologise to her for not thanking her properly. I was in the middle of cooking a BBQ and watching a Virgin Atlantic hot air ballon lose height so rapidly over our house that both the neighbour and I thought we were going to have to rescue a body or two!
Cheers
SteveBTobias, Hi
As I already said in my post I had been using this plugin and NOT the separate ones, it was actually the subject of my post.
It still does not work.
The URL to the page is:-
http://farnhamscouting.com/website/district-directory/
BUT the page is passworded and I do not want, for the obvious reasons, to give the PW out in this post!
I would have to contact you by Skype or send by email?
Cheers
SteveB
Forum: Plugins
In reply to: [Popups - WordPress Popup] Plugin Is Not WorkingWe do not have a developer as this is a charity site.
I’s OK we have gone with another popup product that does work.
Cheers
Steve B