Forum Replies Created
-
AuthorPosts
-
February 8, 2017 at 10:11 am in reply to: Loading a template with Avia lyaout Builder gives me a Error fetching content #744274
Hi Rikard, two days ago I sent you the login but I suspect I did something wrong and it didn’t go through. Here I add it again
best
eelna
Well actually I found the settings in YOAST SEO, but stilld it doesn’t work well… I saw that a possibility for managing social previews better is given with the Yoast Premeium version.
Thanks
Well actually my problem doesn’t concern the sharing button. It is regarding the pasting in facebook or linkedin of the page url (e.g the home page url). If I do that look at what happens http://imgur.com/2k1AQoT
I’ll try the plugin you suggestDecember 21, 2016 at 4:12 pm in reply to: Blog page and archive page with grid layout showing post content #727112Hi Nikko, yes you are right. I achieved the same result, but only with posts written with the standard view. If, on the contrary, I edit a post using the avia layout builder, the short text disappears completely from the blog-grid. Are you aware of it?
Actually it is fine for simple posts, but in the case I would need to build a post template with avia layout builder, then it is a pity that the text excerpt does not appear in blog grid.
December 6, 2016 at 1:36 pm in reply to: Adding a new thumbnail size to Enfold dropdown list #720973Thank you very much Ismael: it works perfectly!
Elena
November 24, 2016 at 12:46 pm in reply to: Customer order details Woocommerce disappeared from checkout page in Enfold #716383Excuse me, I found the code that was interfering. It was the following
//add a custom link to the account registration in the checkout page add_action('woocommerce_checkout_fields', 'add_registration_custom_link'); function add_registration_custom_link(){ if(is_checkout()){ if (!is_user_logged_in()){ $info_message = apply_filters( 'woocommerce_checkout_login_message', __( 'Sei un nuovo cliente? ', 'woocommerce' ) ); $info_message .= '<a href="http://www.vincenzaboutique.it/mio-account?redirect_to=http://www.vincenzaboutique.it/checkout/">' . __( 'Clicca qui per Registrarti', 'woocommerce' ) . '</a>'; wc_print_notice( $info_message, 'notice' ); } } }
I simply deleted it and everything started working again!
November 8, 2016 at 10:28 am in reply to: Adding Avia Elements to Woocommerce archive-product.php #709682Hi Nikko the ftp access is given in the private section.
Yes the idea is to have the wp layer slider [layer-slider-6] and the section with five pictograms over every page that is generated by the archive-page.php, in the same manner of the main shop page.
I could work on shop layout as Enfold gives me the possibility to do it. However I would like that also by selecting a category or subcategory from the left sidebar the page appears in the same manner.
Thanks very much
November 7, 2016 at 9:04 am in reply to: Adding Avia Elements to Woocommerce archive-product.php #709072Hi Nikko,
thanks for the suggestion. The shortcode now is read, but the layout is all messy. Do you have any suggestion?
You can find the site at the following address:
I would like that archive-pages get the same layout of the shop page (http://www.vincenzaboutique.it/negozio/), with the layer slider and the section with the pictograms.
If I paste my shortcodes in the archive-page.php it mess up everything. I tried also to check in the enfold/woocommerce/config.php if I could copy and modify the action woocommerce_before_main_content, but It comes always with the same problem.
I really appreciate your help
- This reply was modified 8 years ago by elenapoliti.
October 25, 2016 at 4:57 pm in reply to: Sidebar doen't display on single product page Enfold #703864Hi Rikard, I still have the website on my local computer as I am working mainly on the code (easier in local environment). I hope I can migrate it online in the next couple of days, as I am waiting fir the activation of the server and domain. I will send you then a temporary login.
In the meanwhile I am trying to work on custom avia shortcodes as in this case I could create a template product page with avia layout builder, which is populated automatically by woocommerce hooks, in order to avoid any manual product update.
I’ll get back to you soon. thanks
October 21, 2016 at 9:57 am in reply to: Creating a text block within a column with a circle coloured shape #702266@rikard everything is fine: I solved it
October 21, 2016 at 9:22 am in reply to: Creating a text block within a column with a circle coloured shape #702241Hi @rikard, thanks and thank you @guenni007, the code works! However I am finding out the way of centering a code block in a 1/3 layout content element. It is aligned on the left.
Hi Andy just found the solution. For information to any other user, here the php code to create an ad hoc shortcodes that adds an <abbr> tag to show full text on mouse hover on acronyms
<?php /*it creates an <abbr> tag*/ if ( !class_exists( 'av_abbr' ) ) { class av_abbr extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('Acronym Extension'); $this->config['order'] = 100; $this->config['shortcode'] = 'av_abbr'; $this->config['tooltip'] = __('Creates a full text which appears on mouse over acronyms terms'); $this->config['inline'] = true; $this->config['tinyMCE'] = array('tiny_always'=>true); } /** * Popup Elements * * If this function is defined in a child class the element automatically gets an edit button, that, when pressed * opens a modal window that allows to edit the element properties * * @return void */ function popup_elements() { $this->elements = array( array( "type" => "tab_container", 'nodescription' => true ), array( "type" => "tab", "name" => __("Content" , 'avia_framework'), 'nodescription' => true ), array( "name" => __("Acronym", 'avia_framework' ), "desc" => __("This is the acronym.", 'avia_framework' ), "id" => "acronym", "type" => "input", "std" => __("ACR", 'avia_framework' )), array( "name" => __("Full title", 'avia_framework' ), "desc" => __("This is the text that appears on your acronym.", 'avia_framework' ), "id" => "title", "type" => "input", "std" => __("Full text", 'avia_framework' )), array( "type" => "close_div", 'nodescription' => true ), ); } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "") { $output = ""; $atts = shortcode_atts( array( 'title'=>'', 'acronym' =>'', ), $atts, $this->config['shortcode']); $output = ''; $output= "<abbr title='".$atts['title']. "'> " . $atts['acronym'] . "</abbr>"; return $output; } } }
You can close the topic. Thanks
Elena
Thanks Andy I already added the function and I started to write a new shortcode php file for that purpose, taking a hint from the dropcap.php file to understand how it works.
Not really sure about how implementing: I did some trials but they did not work. I imagine you cannot help me with a bunch of code?
I’d just like to have a quick shortcut as the one in the image below that adds to the text the <abbr> tag in which I can modify the full title.
I already modify the css with the following code:
abbr { position: relative; } abbr:hover::after { position: absolute; bottom: 100%; left: 0%; display: block; padding: 5px; background: rgb(0,102,204); color:rgba(255,255,255,1); font-size:12px; content: attr(title); white-space: nowrap; }
So that if I add the <abbr> tag manually in the html editor it works. Still it would be nice I could add a shortcut from the Tiny-MCE Editor!
Thanks
Elena
- This reply was modified 8 years, 1 month ago by elenapoliti.
September 27, 2016 at 1:09 pm in reply to: Bad logo resizing with a message of onload="pagespeed.CriticalImages… #692214Hi, in the meanwhile I solved the problem. The server had the Module PageSpeed turned on.
For future reference, I added to the .htaccess file the following code and disabled it
# Disable Mod PageSpeed with parameter off
ModPagespeed offIt seems that PageSpeed interferes with the enfold structure
- This reply was modified 8 years, 1 month ago by elenapoliti.
September 27, 2016 at 12:21 pm in reply to: Bad logo resizing with a message of onload="pagespeed.CriticalImages… #692160I am going to give you access to the web administration panel
September 27, 2016 at 10:55 am in reply to: Customize archive widget code for filtring by year and by category #692113Sorry Andy, but the idea was to manage the blog section with two different main categories: 1) downloadable documents and 2) standard news posts. However, I found that the best solution was to manage downloadable files with a dedicated plugin, i.e. WP Download Manager.
I hence solved my problem
September 13, 2016 at 12:20 pm in reply to: Enfold 3.7 and Woocommerce 2.6 incompatibility issue: zoomed pictures in sliders #685678Hi Rikard, I just found which was the problem! Among the installed plugins I had Woocommerce Advanced Shipping that was getting in conflict with the new WC shipping tables!
Sorry for having bothered you. Thanks for your kindness
You can set this topic as solved
Elena
ps I love your theme!!
September 13, 2016 at 12:02 pm in reply to: Enfold 3.7 and Woocommerce 2.6 incompatibility issue: zoomed pictures in sliders #685657Hi Rikard, excuse me but not email notification arrived for your msg, thus I am late in asnwering to you.
I made a trial on a local installation of my website. I could try to do the entire process online (the website I am working on is in a test folder) and then give you access there. However I realized that now on my local installation I even cannot enter the administration panel. Below the warnings that appear.
Hence you even wouldn’t be able to get in..
Have you any other idea on how to soldve it?Thanks
Elena
Warning: Declaration of WAS_Advanced_Shipping_Method::calculate_shipping($package) should be compatible with WC_Shipping_Method::calculate_shipping($package = Array) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php on line 371
Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_entries.php on line 32
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-login.php on line 402
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-login.php on line 415
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-includes/pluggable.php on line 892
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-includes/pluggable.php on line 893
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-content/plugins/woocommerce-advanced-shipping/includes/class-was-method.php:371) in /Applications/MAMP/htdocs/whalesanddolphins.tethys.org/wp-includes/pluggable.php on line 894
Hello there, excuse me but I found also the solution to the last issue. Actually in the shortcode php code the $loop variable was looking for the english name of the product category! Jus added a condition “or” to add the translated category name and now it works perfectly.
Hence, just for the information to other users, in order to work smoothly with woocommerce custom layout products and wpml I simply changed the translations settings in WPML Woocommerce Multilingual
woocommerce multilingual > settings> native woocommerce product editing screen => although this is not recommended it permits to edit each single product inthe translated version from its page via avia layout builder.
Consider also that Name Your Product must be checked again in each product in the translated page!
You can close the topic
Thanks and sorry for the disturb
Ok I solved more or less all the issues axcept one. First I work with the woocommerce multilingual settings as stated above. This give me the possibility of opening the product in each language from teh standard avia layout builder of Enfold. In this way I can check all settings (example I found that in the automatic copy the Name Your Price Option was not set and that’s why it didn’t appear in the front end).
I downloaded a wpml-config.xml file that I copied in my child theme and the menu now has the same color taken from my custom css style sheet.
However the custom shortcodes don’t work. They appear in the avia layout builder in the administrative panel (while editing the product), but nothing appears in the front-end. It is like the php function I wrote is not working in the front end translated page.
The code is the following… maybe I should add something the php file.
It takes takes the formatted name from each variation of the product (which are cruise dates) and it extrapolates the variation name and its stock availability (= places available in each cruise date).
<?php if( !class_exists( 'woocommerce' ) ) { add_shortcode('csr_calendar_button', 'avia_please_install_woo'); return; } if ( !class_exists( 'avia_csr_calendar_button' ) ) { class avia_csr_calendar_button extends aviaShortcodeTemplate { /** * Create the config array for the shortcode button */ function shortcode_insert_button() { $this->config['name'] = __('CSR Calendar', 'avia_framework' ); $this->config['tab'] = __('Plugin Additions', 'avia_framework' ); $this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-button.png"; $this->config['order'] = 23; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'csr_calendar_button'; $this->config['tooltip'] = __('Display the "CSR Calendar" button for the current product', 'avia_framework' ); $this->config['drag-level'] = 3; $this->config['tinyMCE'] = array('disable' => "true"); $this->config['posttype'] = array('product',__('This element can only be used on single product pages','avia_framework')); } /** * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className * * * @param array $params this array holds the default values for $content and $args. * @return $params the return array usually holds an innerHtml key that holds item specific markup. */ function editor_element($params) { $params['innerHtml'] = "<img src='".$this->config['icon']."' title='".$this->config['name']."' />"; $params['innerHtml'].= "<div class='avia-element-label'>".$this->config['name']."</div>"; $params['content'] = NULL; //remove to allow content elements return $params; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "") { $output = ""; $meta['el_class']; global $woocommerce, $product; if(!is_object($woocommerce) || !is_object($woocommerce->query) || empty($product)) return; // $product = wc_get_product(); $output .= "<div class='av-woo-calendar-button ".$meta['el_class']."'>"; ob_start();?> <table cellspacing="0" cellpadding="2"> <thead> <tr> <th scope="col" style="text-align:left; background-color:rgba(255,255,255,1); vertical-align:middle;"><?php _e('Cruise', 'woothemes'); ?></th> <th scope="col" style="text-align:center;background-color:rgba(255,255,255,1);"><?php _e('Places<br/>available', 'woothemes'); ?></th> </tr> </thead> <tbody> <?php $args = array( 'post_type' => 'product_variation', 'post_status' => 'publish', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'meta_query' => array( array( 'key' => '_stock', 'value' => array('', false, null), 'compare' => 'NOT IN' ) ) ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); $product = new WC_Product_Variation( $loop->post->ID ); if (get_the_title( $loop->post->post_parent ) == 'CSR Expeditions Payment') { $variation_formatted_name = $product->get_formatted_name(); $variation_name_array = explode("–", $variation_formatted_name); $variation_name = $variation_name_array[2]; $variation_price = $variation_name_array[3]; $variation_sku = $variation_name_array[0]; $variation_name_only = explode(":", $variation_name); $variation_name_only = $variation_name_only[1]; ?> <tr> <td><?php echo $variation_name_only ."–" . $variation_price; ?></td> <?php if (intval ($product->stock) >0) { ?> <td style="text-align:center; font-size: 13px; background-color:#70C940; color:rgba(255,255,255,1);"><?php echo intval ($product->stock); ?></td> <?php } else { ?> <td style="text-align:center; font-size: 13px; background-color:#D11E1B;color:rgba(255,255,255,1);"> <?php echo intval ($product->stock); ?></td> <?php } ?> </tr> <?php } endwhile; ?> </tbody> </table> <?php $output .= ob_get_clean(); $output .= "</div>"; return $output; } } }
Just to update you in my progresses: I tried to change on woocommerce multilingual > settings> native woo commerce product editing screen (instead of wpm translation editor). Now the product appears more or less like it should. However the custom html code doesn’t appear as well as the avia-layout shortcode that I created to show the calendar.
Moreover I noticed that for those products that use the Woocommerce Name Your Price plugin the field for writing the price doesn’t show up.
Another thing is that the menu font color (which was ovrewritten a in style.css in my child theme) appears as set in the Theme options: i.e. it doesn’t get information from my css.
I guess I lost some passage to make the full theme translatable and thus the informations stored in my child theme (css sheets and custom shortcodes) are not loaded in the italian version
Any suggestion?
Thanks
Elena
- This reply was modified 8 years, 4 months ago by elenapoliti.
Hello, while waiting for your answer I tried again the installation of wpml and right now it seems everything ok. I mean, I translated the home page and the blog page. Fine.
However, before translating the rest of the pages, I tried to to translate the Woocommerce section. Here I found a major problem. First with woocommerce multilingual plugin I did translate categories and attributes. After that I did translate the products. However here comes the problem. I created each product page with avia layout builder and in the orginal language (english) everything was fine. Now the translated products show the default woocommerce product appearance above my personal layout. Moreover, se html code that I wrote and included (the calendar with places availability below the add to cart button) does not appear anymore.
I include two screenshots. Let me know if you need to log in the website since I am working on a local machine. Right now the NOT translated web site is available at http://whalesanddolphins.tethys.org/test/product/csr-expeditions-payment/
I prefer to do the tests on a local machine before substituting the web site online.Please let me know as it is urgent
Thank you very muchHi IsmaelI just checked out on my site. Strangely, the map does now work with the online site, but still doesn’t work on my local site (via Mamp).
I say strangely, since it has always worked even in local. However, what is important is that it is visible when online
Elena
No news from the Kriesi staff?
Hi everybody same problem with Google Maps here…
Thanks Rikard, I am working on a local machine. Today I should be able to put the test online and give you a link. In the meanhile I found a solution, but I still need your help. Hence, if you don’t mind, I get back to you later.
Best
elenaHi Ismael, yes I did copy it with the same folder structure. I did it with other themes in the past and it worked perfectly. Strange, this doesn’t work with enfold. It’s a kind of bizarre problem… seems so easy but I don’t get out of it!
You are right: it was so simple! Thank you! Do you have btw any suggestion on how to override some woocommerce templates (such as e.g. the form-shipping.php) instead? I tried to save a modified copy in a woocommerce subfolder within my child theme but it doesn’t work.
Any suggestion?
Hi Ismael I tried to use the function get_formatted_name, but it was giving the whole bunch of data formatted ina string. I just wanted the name of the variation, and in order to avoid overriding the original function I preferred creating a new one.
Can you suggest me wherelse I can save the file with the function so that it works, instead of leaving it in the original WC folder? I have the same problem also with one modified template of woocommerce. It doesn’t work if saved in my child theme.
Thanks
Elenayes thanks
-
AuthorPosts