Page 1 of 1
email layouts
Posted: 11 May 2018, 17:22
by MM0233
Hello again,
Where can I found layouts for emails of the various order statuses?
I'd like to make some style changes and change the SKU code with ISBN code on the bill.
Thank you.
Re: email layouts
Posted: 14 May 2018, 18:05
by MM0233
Ok found here: components/com_phocacart/layouts/order.php
but now i need the query to add the isbn, someone can tell me where can i found it? I've searched in libraries folder but i didn't found it.
Re: email layouts
Posted: 14 May 2018, 22:23
by Jan
Hi,
for now there is no such option.
You can do it for now this way:
open this file: administrator\components\com_phocacart\libraries\phocacart\product\product.php
and add this function there:
Code: Select all
public static function getProductCodes($id) {
$db = JFactory::getDBO();
$wheres = array();
$wheres[] = ' a.id = '.(int)$id;
$query = ' SELECT a.sku, a.upc, a.ean, a.jan, a.isbn, a.mpn, a.serial_number'
.' FROM #__phocacart_products AS a'
.' WHERE ' . implode( ' AND ', $wheres )
.' ORDER BY a.id'
.' LIMIT 1';
$db->setQuery($query);
$productCodes = $db->loadAssoc();
return $productCodes;
}
(I will add this function into the next version, so it will be not needed to add it in future again)
and then in order: components\com_phocacart\layouts\order.php
on line cca: 472 after:
Code: Select all
foreach($d['products'] as $k => $v) {
add:
Code: Select all
$codes = PhocacartProduct::getProductCodes((int)$v->product_id);
// echo $codes['isbn'];
This way you can get the isbn of the product (but be aware the isbn is loaded from current product, not from oder which was made, so if the isbn of the product will change in future, you will always get the latest isbn not the isbn which was valid in date of order)
Jan
Re: email layouts
Posted: 15 May 2018, 15:43
by MM0233
[SOLVED]
Perfect! Problem solved. Necessary upgrade. And you, precoius as always. Thank you.
Re: email layouts
Posted: 17 May 2018, 00:28
by Jan
Ok
Re: email layouts
Posted: 04 Jun 2018, 09:48
by andraspal
Re: email layouts
Posted: 06 Jun 2018, 23:06
by Jan
Hi, I get 404 when displaying the links
Jan
Re: email layouts
Posted: 06 Jun 2018, 23:26
by andraspal
Sorry, those were really long urls, but anyway, the end part is interesting: http:///media/com_phocacart/images/phoca-cart.png
That url is hardcoded somewhere, somehow in phocacart. I manually altered it so its ok now, but I guess it should be fixed at some stage.