<a class="iubenda-white no-brand iubenda-embed iub-body-embed" title="Privacy Policy" href="https://www.iubenda.com/privacy-policy/30241026">Privacy Policy</a>
<script type="text/javascript">// <![CDATA[
(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);
// ]]></script>
<a class="iubenda-white no-brand iubenda-embed iub-body-embed" title="Cookie Policy" href="https://www.iubenda.com/privacy-policy/891167/cookie-policy">Cookie Policy</a>
<script type="text/javascript">// <![CDATA[
(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);
// ]]></script>
<a href="/privacy-policy/" alt="Privacy Policy" title="Privacy Policy">Privacy Policy</a> | <a href="/cookie-policy/" alt="Cookie Policy" title="Cookie Policy">Cookie Policy</a>
Categoria: Senza categoria
SquareSpace Scroll
va inserito dentro la pagina specifica
<script src="https://code.jquery.com/jquery-2.1.3.min.js">
</script><script type="text/javascript">
$(function() {$('a[href*=#]:not([href=#])').click(function() {if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {var target = $(this.hash);target = target.length ? target : $('[name=' + this.hash.slice(1) +']');if (target.length) {$('html,body').animate({scrollTop: target.offset().top}, 1000);return false;}}});});
</script>
si aggiunge un nuovo blocco di codice
<a name="special"></a>
Portfolio Domìni Veneti
il file per modificare la visualizzazione della pagina https://www.dominiveneti.it/cultura-vino/ si trova in /themes/bridge/includes/shortcodes/sortcode-elements/portfolio-list.php
Youtube embed
<div class="rwd-video">
<iframe src="//www.youtube.com/embed/ID-VIDEO?rel=0" allowfullscreen="" frameborder="0" height="360" width="640">
</iframe>
</div>
.rwd-video {
height: 0;
overflow: hidden;
padding-bottom: 56.25%;
padding-top: 30px;
position: relative;
}
.rwd-video iframe,
.rwd-video object,
.rwd-video embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
Bisogna mantenere la proporzione di 56,25% che è il rapporto di 16/9 (9/16 = 0,5625)
Per calcolare ampiezze differenti: altezza*0,5625: 640*0,5625 = 360 e manterrà l’aspect ratio
WooCommerce – Soglia spedizione gratuita
add_action('woocommerce_before_cart_totals', 'notifica_spedizione_gratuita_carrello');
add_action('woocommerce_checkout_before_order_review', 'notifica_spedizione_gratuita_checkout');
function notifica_spedizione_gratuita_carrello() {
global $woocommerce;
if (is_cart()){
$soglia = '60.00'; //soglia spedizione gratuita
$subtotale = WC()->cart->subtotal;
if ($subtotale > $soglia){
} else {
echo '
<div class="alert-carrello-spedizione" id="stickyform2-head-carrello">
<div class="text" style="color:#ffffff;font-size:12px;"><span style="font-size: 18px; font-weight: 700;">MANCANO SOLO <span class="prezzo_rimanente">'. wc_price( $soglia - $subtotale ) .'</span> PER RICEVERE GRATIS I TUOI VINI!</span>
</div>
</div>
';
}
}
}
function notifica_spedizione_gratuita_checkout() {
global $woocommerce;
if (is_checkout()){
$soglia = '60.00'; //soglia spedizione gratuita
$subtotale = WC()->cart->subtotal;
if ($subtotale > $soglia){
} else {
echo '
<div class="alert-carrello-spedizione" id="stickyform2-head-carrello">
<div class="text" style="color:#ffffff;font-size:12px;"><span style="font-size: 18px; font-weight: 700;">MANCANO SOLO <span class="prezzo_rimanente">'. wc_price( $soglia - $subtotale ) .'</span> PER RICEVERE GRATIS I TUOI VINI!</span>
</div>
</div>
';
}
}
}
WooCommerce Google Structured Data :: Prezzo IVA e Condizione prodotto
add_filter('woocommerce_structured_data_product_offer','google_shopping_missing_tag');
function google_shopping_missing_tag($markup_offer) {
if ( ! is_object( $product ) ) {
global $product;
}
if ( ! is_a( $product, 'WC_Product' ) ) {
return;
}
if ( '' !== $product->get_price() ) {
$markup_offer['price'] = wc_format_decimal( wc_get_price_including_tax( $product ), wc_get_price_decimals() );
$markup_offer['itemCondition'] = 'https://schema.org/NewCondition';
}
return $markup_offer;
}
Bottiglie DV
per aggiungere una scritta sotto la categoria dei prodotti, bisogna modificare il file
/themes/flatsome/inc/woocommerce/structure-wc-product-box.php
aggiungere queste linee
$confezione = get_post_meta(get_post()->ID, "wccaf_confezione", true );
if ($confezione){
echo '<p id="tipo_confezione" class="uppercase is-smaller">' . $confezione . '</p>';
}
SelectWoo – Select2 – FlatSome
Per modificare i valori del copy all’interno di una finestra Select2 o SelectWoo, su Woocommerce bisogna modificare il file che risiede in
plugin/wooxommerce/assets/js/selectWoo/selectWoo.full.min.js
Wistia su Flatsome
<script src="https://fast.wistia.com/embed/medias/xga7x4rwyk.jsonp" async></script> <script src="https://fast.wistia.com/assets/external/E-v1.js" async></script> <span class="wistia_embed wistia_async_xga7x4rwyk popover=true popoverContent=link" style="display:inline"> <a href="#" class="button open-video icon circle is-outline is-xlarge"><i class="icon-play" style="font-size:1.5em;"></i></a></span>
Generare EAN-13 validi
<?php
function generateEAN($number)
{
$code = '80' . str_pad($number, 9, '0');
$weightflag = true;
$sum = 0;
// Weight for a digit in the checksum is 3, 1, 3.. starting from the last digit.
// loop backwards to make the loop length-agnostic. The same basic functionality
// will work for codes of different lengths.
for ($i = strlen($code) - 1; $i >= 0; $i--)
{
$sum += (int)$code[$i] * ($weightflag?3:1);
$weightflag = !$weightflag;
}
$code .= (10 - ($sum % 10)) % 10;
return $code;
}
$codice = rand(155687123, 986123548);
for ($i= 1; $i<= 1037; $i++)
{
$codice = rand(155687123, 986123548);
echo generateEAN($codice). '<br />';
}
?>