PDA

View Full Version : Custom product field in BASK screen...


alexboyer
06-21-06, 06:28 PM
Hello,

Well just like the title says, I'm curious whether it's possible to add custom product fields to the Basket Contents section. I've placed this item in the code:


&mvt:product:customfield_values:customfields:partnu mber;


But it's not showing up... Any ideas?

Thanks!

Bruce - PhosphorMedia
06-21-06, 07:08 PM
Because the BASK Screen does't call data from the Product data fields (which would include the custom product fields). Data on the Bask screen is called from the Basket database.

wcw
06-21-06, 09:27 PM
Yes, it can be done. Since the custom product fields are not part of the baskets database, you need to have a 3rd party module do a lookup in the custom product fields database.

The Emporium Plus Tool Kit at
http://www.emporiumplus.com/go/wcw/PROD/1AAM5/1AA00223
is just such a module. Take a look at the last example on the product's page that uses the custom function. It's fairly straightforward.

This tool kit library is full of features that you might find useful in addition to being able to display the custom product fields in various screens. Assigning variables and doing math and date functions makes it well worth the current low price.

alexboyer
06-21-06, 09:58 PM
Ok thanks I'll look into that. For now I just used javascript/PHP to get the info.

DanLynn
07-06-06, 03:39 AM
Can you add any component to aquire those variables into the page?

DanLynn
07-06-06, 04:53 AM
To clarify, I mean, can you go into items and add products or something like that and make a call to it to be able to access that information?

wcw
07-06-06, 01:40 PM
"make a call to it"

What "it" (javascript/php/toolkit/other component module) are you referring to? Are you talking about displaying custom product fields in the basket using "it"?

DanLynn
07-06-06, 06:59 PM
Well, it was vague because I'm really not sure exactly what could be done. I was definitely thinking something self-contained in miva. For example, could you initialize a module that would load the products fields, including the custom fields. I was trying it last night by adding the products_list module and trying to reference the variables then, but I didn't have any luck.

I guess in the worst case scenerio, I can just whip up a module quick to pull that custom field, but it seems like there should be an easier way.

wcw
07-06-06, 07:12 PM
Go to the point and click mode and check the box next to the custom fields you want to display. That will ensure they are added to the array when the module is initialized. The code can then display the variables in the array. That is built in without a module. On the basket page you are not using the product list; you are using the basket items list. That built-in module does not retrieve custom field data. Hence, the reason for the question in at the beginning of this thread.