Skip to main content

Specifications in checkout and emails

More
10 years 11 months ago #218779 by wernejo
-- Joomla version -- : 3.4.5

Hi,

I was hoping you could just give me some quick help on what the correct code is to make the product specifications appear with the product in both the checkout and in the email that gets sent out.

I've looked at the tutorial www.hikashop.com/support/support/documen...ize-the-display.html and understand what I need to do but just wanted to check with you what the correct code would be.

Thanks.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #218836 by Xavier
Hi,

The view to edit to display the informations in the cart of the checkout is "checkout / cart".
And for the emails, you can edit them directly via our menu System > Emails.

So the specifications on the product page are the product dimensions and custom product fields.
To display that you can use this kind of code:
Code:
echo $this->row->product_width; echo $this->row->product_height; echo $this->row->product_length; echo $this->row->customfieldname;

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #218917 by wernejo
I've given that a try but with no luck.

I tried copying the code from the other parts of the site where the specifications do appear but with no luck.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #218922 by Xavier
Hi,

My bad, in the view "checkout / cart" the code to use is only:
Code:
echo $row->product_width; echo $row->product_height; echo $row->product_length; echo $row->customfieldname;

And must be placed in the foreach listing the products, and of course the "customfieldname" must be replaced by your custom product field column name ;)

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #219114 by wernejo
Thanks for your help, that worked!

The only thing is that I'm still having a little trouble getting it to work in the emails.

I understand that I need to add in a "LINEVAR" in the HTML version to call up the <?php echo $row->packincludes; ?> code that is in the Preload version but I can't seem to get it working. could you please have a look at my code and let me know if it's correct?

HTML Version
Code:
<!--{START:PRODUCT_LINE}--> <tr> <td style="border-bottom:1px solid #ddd;padding-bottom:3px;"> {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_DOWNLOAD} {LINEVAR:PRODUCT_DETAILS} {LINEVAR:PRODUCT_SPECS} </td> <td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td> <td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td> <td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td> </tr> <!--{END:PRODUCT_LINE}-->

Preload Version
Code:
$cartProduct['PRODUCT_SPECS'] = $row->packincludes; $cartProduct['PRODUCT_PRICE'] = $unit_price; $cartProduct['PRODUCT_TOTAL'] = $total_price; $cartProducts[] = $cartProduct;

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #219115 by nicolas
Hi,

If you look at the code in the preload before these lines, it's not $row that you need to use but $item instead.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #219210 by wernejo
I've made the changes as you mentioned, but I still can't get it to work.

This is the code I'm using for the preloaded section, but I can't figure out what I'm doing wrong. Any Ideas?
Code:
$cartProduct = array( 'PRODUCT_CODE' => $item->order_product_code, 'PRODUCT_QUANTITY' => $item->order_product_quantity, 'PRODUCT_IMG' => '', 'item' => $item, 'product' => $product, 'PRODUCT_SPECS' => $item->packincludes, ); $cartProduct['PRODUCT_SPECS'] = $item->packincludes;

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #219239 by nicolas
Hi,

So it must be a problem with the custom field.
I thought it was a custom item field.
But maybe you're talking about a custom product field ?
In that case, you need to load the product data like that:
Code:
$class = hikashop_get('class.product'); $product = $class->get($item->product_id); $cartProduct['PRODUCT_SPECS'] = $product->packincludes;

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #219312 by wernejo
That worked perfectly!

thank you so much for your help :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.243 seconds
Powered by Kunena Forum