View Full Version : mivascript (not mvt) for customer ID
dreamingdigital
09-11-06, 06:17 PM
What's the code for customer ID in mivascript? Not mvt stuff. I know it's g.Basket:CUST_ID in mvt. I need the actual mivascript variable. I tried Customers.d.login with no success. I need to pass that value to a PHP file using ADS external file.
Vic - WolfPaw Computers
09-11-06, 06:25 PM
Customer ID is simply the database index for the record. Login would be the customer's login ID.
If you actually want the record number, it would be Customers.d.id
It varies depending on the screen. If you were using my Tool Kit module to post to a PHP script on the screen after updating the account record, it might look something like
<mvt:item name="toolkit" param="callurl|sample|http://www.mydomain.com/subscribe.php|POST|Customer_Login,Customer_ShipFir stName,Customer_ShipEmail" />
On other screens, the variables would be something else. You need to look at the form variables you are posting. They will be on the next (landing) screen as global variables.
dreamingdigital
09-11-06, 06:45 PM
thanks for the replies. I tried both and both aren't the right one for this module. I want to use a PHP file and that file needs to display conditional code if the customer is logged in or not. The screens I need the file to work on are OCST, OSEL and OPAY. I've tried lots of variations. I contacted the developer of the external file module.
[CODE]
<mvt:if expr="g.basket:cust_id GT 0">
logged in
<mvt:else>
not logged in
</mvt:if>
dreamingdigital
09-11-06, 07:02 PM
Thanks Bill. That's what I use within miva. :) I need to pass the customer id variable to the PHP file so it can determine if logged in or not. :)
dreamingdigital
09-11-06, 08:22 PM
I couldn't figure it out and the developer didn't have the variable so this is what I did instead.
<mvt:if expr="g.Basket:CUST_ID LT 1">
<mvt:item name="ads-extfile" param="call|https://miva.rctoys.com/Merchant2/product_include_files/checkout/rightnav.php?logged_in=false" />
<mvt:else>
<mvt:item name="ads-extfile" param="call|https://miva.rctoys.com/Merchant2/product_include_files/checkout/rightnav.php?logged_in=true" />
</mvt:if>
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.