Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $output = '<!-- Begin product review widget code -->' ;
- $output .= '<div id="ndrsl-prod-646c3bda1796af356c6d134b" class="ndrsl-widget ndrsl-product-widget"' ;
- // If currency sign is prepended, switch places of $price & $currency
- $price_arr = explode(' ', $product['price']) ;
- $price = $price_arr[0] ;
- $currency = $price_arr[1] ;
- // If you want to use currency ISO code instead of currency sign, simply write $currency = 'USD' or whatever instead.
- $output .= ' data-product-id="' . $product_id . '"' ;
- $output .= ' data-product-name="' . $product['name'] . '"' ;
- $output .= ' data-product-url="' . $href . '"' ;
- $output .= ' data-product-image-url="' . $product['thumb'] . '"' ;
- $output .= ' data-product-description="' . $product_detail['description'] . '"' ;
- $output .= ' data-product-price="' . floatval($price) . '"' ;
- $output .= ' data-product-currency="' . $currency . '"' ;
- $output .= '></div>' ;
- $output = '<!-- End product review widget code -->' ;
- echo $output ;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement