I guess I do need to figure out how to format this in currency. The following drops the 0 if it is something like this $1.10 and displays as $1.1
Any suggestions for the below code?
<mvt:do name="l.return" file="g.Module_Library_DB" value="Product_Load_Code('POSTAGESTD', l.settings:product)" />
&mvte:product:price;
Thanks!
Announcement
Collapse
No announcement yet.
Toolkit sproduct question - custom fields
Collapse
X
-
Ok I got it to display the price and can just add the dollar sign at the beginning so this works - thanks again!
<mvt:do name="l.return" file="g.Module_Library_DB" value="Product_Load_Code('POSTAGESTD', l.settings:product)" />
&mvte:product:price;
Leave a comment:
-
That worked perfect thank you and the references are helpful.
Sorry one last question in regards to that same product. I also need to display the formatted price and replace this toolkit code as well. I don't see the reference to sproduct in there.
<mvt:item name="toolkit" param="sproduct_find|productfound|POSTAGESTD|" />
&mvte:key_product:formatted_price;
Leave a comment:
-
Here are some code snippets for common toolkit functions that can be replaced by native template code:
https://docs.miva.com/template-langu...ement-examples
The sproduct_find just loads the core product data for a product. To also load the custom fields the function leslie posted is the correct one. You just need to pass in the correct product id/code:
Here would be an example in your case:
Code:<mvt:item name="customfields" param="Read_Product_Code('POSTAGESTD', 'SizeQtyBlurb', l.settings:product:SizeQtyBlurb)" /> <mvt:if expr="NOT ISNULL l.settings:product:SizeQtyBlurb"> &mvte:product:SizeQtyBlurb; </mvt:if>
Leave a comment:
-
Thank you, I will repost there and I guess I should really start working on replacing toolkit code sooner rather than later.
Leave a comment:
-
Originally posted by mstella1 View PostHi,
Is it possible using the sproduct function to pull data from custom fields? I am using the code below on my FAQ screen and would like to also pull in some info from the custom fields of certain products to save myself from having to update information when we have changes.
<mvt:item name="toolkit" param="sproduct_find|productfound|POSTAGESTD|" />
&mvte:key_product:formatted_price;
Trying to pull in from custom field "SizeQtyBlurb"
Any help would be greatly appreciated!
Mike
Code:<mvt:item name="customfields" param="Read_Product_ID(l.settings:product:id, 'notes', l.settings:product:notes)" /> <mvt:if expr="NOT ISNULL l.settings:product:notes"> &mvt:product:notes;
Leave a comment:
-
Toolkit sproduct question - custom fields
Hi,
Is it possible using the sproduct function to pull data from custom fields? I am using the code below on my FAQ screen and would like to also pull in some info from the custom fields of certain products to save myself from having to update information when we have changes.
<mvt:item name="toolkit" param="sproduct_find|productfound|POSTAGESTD|" />
&mvte:key_product:formatted_price;
Trying to pull in from custom field "SizeQtyBlurb"
Any help would be greatly appreciated!
MikeTags: None
Leave a comment: