Quantcast
Channel: Nederland » Recent Posts
Viewing all articles
Browse latest Browse all 30043

sneekerz on "Stukje code voor prijs bepaling"

$
0
0

Beste

Ik ben opzoek naar een stukje code welke achter de prijs
- P.stk.
of p.p. kan zetten

Dit wil ik dan doen op basis van de id's die in wordpress worden gemaakt deze kan ik eventueel zelf handmatig toevoegen

Mijn php kennis is zeg maar gerust niets :)

maar ik denk dat het zoiets moet zijn als

als id = 51 laatzien € 20,00 p.stk. 

anders id = 50 laatzien €21,50 p.p.

De code waarin dit zou moeten gebeuren is

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $post, $product;
?>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

	<p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>

	<meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
	<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />

</div>

Eventueel tegen een kleine vergoeding

Alvast bedankt


Viewing all articles
Browse latest Browse all 30043

Trending Articles