Fabrizio Cocchi
Da Webmobili Wiki.
Info
Account su Register. Abbiamo creato un sottodominio listanozze e puntato al nostro Apache su AWS.
Register
AFC288-EURO Fabrizio2020!
Personalizzazioni plugin lista notte
Plugin -> nm-gift-registry
griglia default -> Includes/lib/Setup + css personalizzato -> .nmgr-display-modes {display: none;}
non cliccabile il prodotto -> Includes/Table/iItemsTable.php riga 224
traduzioni
Aggiunta Cadauno al prezzo
Modificato file originale del plugin nm-gift-registry\includes\Tables\ItemsTable.php
public function get_item_cost() {
ob_start();
$item = $this->get_row_object();
$cost_per_item_text = nmgr()->is_pro ?
__( 'Cost per item', 'nm-gift-registry' ) :
__( 'Cost per item', 'nm-gift-registry-lite' );
?>
<div class="nmgr-tip" title="<?php echo esc_attr( $cost_per_item_text ); ?>">
<?php echo wp_kses_post( $item->get_cost( true )." (cad.)" ); ?>
</div>
<?php
return ob_get_clean();
}
Rimozione Link Lista Nozze e aggiunta Carrello
Modificato file del plugin nm-gift-registry\includes\Lib\Single.php
Al fondo aggiunta la funzione e aggiunto link Vai al Carrello e all'inizio del file:
<?php
public static function run() {
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_images' ), 10 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_title' ), 20 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_display_name' ), 30 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_event_date' ), 40 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_description' ), 50 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'vai_al_carrello' ), 51 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_notices' ), 60 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_items' ), 70 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'show_share_links' ), 80 );
//add_action( 'nmgr_wishlist', array( __CLASS__, 'show_copy_link' ), 90 );
add_action( 'nmgr_wishlist', array( __CLASS__, 'vai_al_carrello' ), 91 );
}
public static function vai_al_carrello ($wishlist){
?>
<div class="wm-carrello">
<a href="<?php echo wc_get_cart_url(); ?>">Vai al carrello</a>
</div>
<?php
}
Tema figlio
Functions.php
Css personalizzato
/*Opzioni visualizzazione lista/griglia articoli*/
.nmgr-display-modes {display: none;}
/*Bottone Aggiungi al carrello*/
.nmgr_add_to_cart_button.button {
display: inline-block;
font-weight: 400;
color: #fff;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-color: #000;
border: 1px solid #000;
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
line-height: 1;
border-radius: 0.375rem;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
text-decoration: none;
}
.nmgr_add_to_cart_button.button:hover {
background-color: #9e9e9e;
border-color: #9e9e9e;
}
.nmgr_add_to_cart_button.button:active {
background-color: #000;
border-color: #000;
}
/*nascondere Footer Colibri*/
#copyright{
display:none;
}