Thank you
Search for this code in catalog\controller\product\product.php
Code: Select all
$this->data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
Code: Select all
$this->data['date_available'] = $product_info['date_available'];
To do that, you'll need to edit catalog\view\theme\YOUR_THEME\template\product\product.tpl
So, you'll need to figure out where you'd like this new info to show up on your theme...and then paste this code in that spot...
Code: Select all
<?php if ( isset($date_available) && !empty($date_available) ) { echo $date_available; } ?>
[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me
now i am trying to show this (availability date message) only when the current date is not the same as availability date...when the date comes the message will automatically stop to show up...any idea?
product A will be available on 25/10/2014
current date 14/10/2014 so display the date
if current date is same as available date then don't display it!!!
Code: Select all
<?php
$now = new DateTime("now");
$then = new DateTime($date_available);
if ($now > $then) {
echo "<p>Today is after the date_available</p>";
} else {
echo "<p>Today is before the date_available</p>";
}
?>
[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me
<?php
$now = new DateTime("now");
$then = new DateTime($date_available);
$date_new = $date_available;
if ($now < $then && !empty($date_available) ) { echo "<h2>Διαθέσιμη ημερομηνία παραλαβής: "; echo date('d/m/Y',strtotime($date_new));
} else {
echo "";
}
?>
is it possible to make the date red color?
Code: Select all
<?php
$now = new DateTime("now");
$then = new DateTime($date_available);
$date_new = $date_available;
if ($now < $then && !empty($date_available) ) { echo "<h2>Διαθέσιμη ημερομηνία παραλαβής: "; echo "<span style='color:red;'>".date('d/m/Y',strtotime($date_new))."</span>";
} else {
echo "";
}
?>
Code: Select all
<?php
$now = new DateTime("now");
$then = new DateTime($date_available);
if ($now < $then && !empty($date_available) ) { echo "<h2>Διαθέσιμη ημερομηνία παραλαβής: "; echo "<span style='color:red;'>".date('d/m/Y',strtotime($date_available))."</span></h2>"; }
?>
[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me
[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me
[module] PayPal Pro w/Recurring Profiles FREE
[module] 1 Click "Amazon Style" Checkout w/PayPal Pro FREE
[module] Adjustable PayPal Pro Fee FREE
[module] Add Sample To Cart LITE FREE
The guide to fixing just about everything wrong with OpenCart FREE!
Add INFINITE SCROLL to your homepage for FREE!
Live update product price for FREE!
Dynamic generation of Opencart coupon, FREE!
Hire me
Users browsing this forum: No registered users and 121 guests