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.
email layouts
-
- Phoca Member
- Posts: 22
- Joined: 02 Feb 2018, 18:18
Re: email layouts
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.
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.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: email layouts
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:
(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:
add:
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
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;
}
and then in order: components\com_phocacart\layouts\order.php
on line cca: 472 after:
Code: Select all
foreach($d['products'] as $k => $v) {
Code: Select all
$codes = PhocacartProduct::getProductCodes((int)$v->product_id);
// echo $codes['isbn'];
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 22
- Joined: 02 Feb 2018, 18:18
Re: email layouts
[SOLVED]
Perfect! Problem solved. Necessary upgrade. And you, precoius as always. Thank you.
Perfect! Problem solved. Necessary upgrade. And you, precoius as always. Thank you.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
-
- Phoca Member
- Posts: 34
- Joined: 16 May 2018, 19:46
Re: email layouts
I have blank images in emails. This is where those images should be coming from:
https://ci6.googleusercontent.com/proxy ... a-cart.png
https://ci4.googleusercontent.com/proxy ... ca-pos.png
https://ci6.googleusercontent.com/proxy ... a-cart.png
https://ci4.googleusercontent.com/proxy ... ca-pos.png
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: email layouts
Hi, I get 404 when displaying the links
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 34
- Joined: 16 May 2018, 19:46
Re: email layouts
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.
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.