View Full Version : Extracting Basket Contents for ROI script
We are in need of extracting the basket contents (multiple items) and inserting them into a javascript based ROI script. They are need to be formatted in a particular manner in accordance with the ROI script.
We are not sure how to do this. We are thinking of two options right now, both of which we have limited knowledge of how to accomplish:
1) OUI tokens coded into the ROI script (this can get messy, due to the complexity required)
2) A module that would pull the variables out of miva using miva script and assign them to the particular javascript variables. (preferable option)
3) unknown options...
Any help on identifying how we could proceed with this and if any modules exist that could help us. All help is welcome.
mm: 4.24 (upgrading to miva 5 in the next 9 months)
oui: latest
Thank you
Tim.
Vic - WolfPaw Computers
11-03-06, 04:18 PM
Put the javascript in your INVC screen Footer, then use the OpenUI ShortCut drop downs to select the variables you need. Usually the ones under Current Order are what you need.
Kent Multer
11-03-06, 05:48 PM
Actually, it's more complex than that; it would take a fairly complex set of OUI tokens to retrieve a list of the items in the basket. And of course, that'd all be useless when they go to MM5. Tim, if you want to discuss a custom module, please drop me a line by email.
Vic - WolfPaw Computers
11-03-06, 06:20 PM
Well, it CAN be more complex :)
If you are looking to track ROI per product, then yes. MUCH more complicated and will slow your store down...especially if you are hosted with one of the many non-MIVA Saavy hosting companies.
If you just need order totals and such, it would be fairly easy.
Perhaps if you listed what variables your ROI script tracks, I could be more detialed.
Actually, it's more complex than that; it would take a fairly complex set of OUI tokens to retrieve a list of the items in the basket. And of course, that'd all be useless when they go to MM5. Tim, if you want to discuss a custom module, please drop me a line by email.
Order Total I can do with a simple OUI token.
We are more interested in tracking per product through the ROI script. We've implement multiple ROI scripts in the past year and this has always been by far the single issue that holds us up from getting a fully functional ROI script.
Besides the per product tracking, the rest we feel can be implemented through 'simple' OUI tokens.
>>
Essentially we would need the ability to pull out the basket line items that appear in Miva - we would need to pull (theoretically) anything that pertains to the product basket line item, I can't quite remember off the top of my head what exactly we need.
Tim.
Vic - WolfPaw Computers
11-03-06, 07:16 PM
I would recommend a custom script for this.
You would have to scan the basket list line by line and extract data. This would be impractical to do using tokens, as it would severely impact performance.
PCINET - Andreas
11-03-06, 07:27 PM
In case you got VikingCoders OtherPage Templates then you could integrate your JavaScript in the product section of the invc template.
This section cycles thru all products and all you would have to do is feed those data to your JavaScript one by one.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.