Hi,
Attach Serial
I updated the "attach serial" documentation in order to use the sample coupon image we included in HikaSerial 1.7.4
www.hikashop.com/support.html?id=152:hik...ns-attachserial-form
Basically, if you don't see an image, the first common error is that the image you use is not present in your server.
We had to download the sample image and copy it in your "images" folder. Because several people forget to do that, we include a sample image (which is nicer than the previous one).
Please now use the image /media/com_hikaserial/images/coupon_01.png which is include with HikaSerial 1.7.4
Consuming
The view "serial | consumed_html" is displayed when a serial is right consumed. You can override this view in order to display the information you want.
<?php
if(!empty($this->serial)) {
?>
<div class="hikaserial_serial_consume_page">
<fieldset class="input">
<h2><?php echo JText::_('HIKASERIAL_ENTER_SERIAL'); ?></h2>
<p><?php echo $this->serial->serial_data; ?></p>
<?php echo JText::_('CONSUME_THANK_YOU'); ?>
</fieldset>
</div>
<?php
} // The rest of the view is truncated in this sample..
In the default view we only display the "$this->serial->serial_data" which is the serial data.
But you can display all information link to the serial, about the user, the order or the product attached.
The order id is accessible though "$this->serial->serial_order_id"
The user id is accessible though "$this->serial->serial_user_id"
The order product id is accessible though "$this->serial->serial_order_product_id"
So if you want to display some data from the order product, you have to load it.
if(!empty($this->serial->serial_order_product_id)) {
$orderproductClass = hikaserial::get('shop.class.order_product');
$orderProduct = $orderproductClass->get( $this->serial->serial_order_product_id )
echo $orderProduct->order_product_name;
}
If you want to display data from the product, you have to load it too.
if(!empty($orderProduct->product_id)) {
$productClass = hikaserial::get('shop.class.product');
$product = $productClass ->get( $orderProduct->product_id )
echo $product->product_description;
}
Regards,