Jump to content

Assigning external variable to custom field value..


eccen

Recommended Posts

I am wondering if there is a way to assign a variable to a product custom field value.

I am 'guessing' it can be done by something like

 

{php}$ID = $_GET['ID']{/php} (assign value from url to $ID)

{assign var=$customfield.value value=$ID}

 

I have been trying to figure this out for whole day but have not had any luck :? Hope someone can help me out.

I am doing this in template/orderforms/cart/configureproduct.tpl.

Link to comment
Share on other sites

Thank you for the help. Here is what I am trying to achieve.

 

Customers will purchase an item at a url like below.

 

whmcs/cart.php?a=add&pid=3&sid=$sid

 

Here, $sid is a unique product number assigned from a script outside of WHMCS.

I would like to pass this variable through the domain checker and ordering process. When the payment is complete, I want to have a database table value associated with $sid changed. (querying UPDATE product SET status='Active' WHERE sid='$sid')

 

For better understanding, I am selling template websites and I want my customers to create 'draft' sites at no cost. These 'draft' sites will have product status as 'Draft' and will change to 'Active' upon purchase.

 

Anyway, I was thinking I could do this using 'custom field' feature in WHMCS and apparently having trouble... Please let me know if you can give me some direction! :|

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated