Jump to content

product custom field


david_d

Recommended Posts

hi

 

iam building a custom third party gateway and i need the URL in the mygatewaydh_link function

to be dynamic so my gateway will know which product to show

 

what i did is adding a new custom filed for each product with is id in my gateway

so my _link function look like this

 

<form method="POST" action="https://url/buynow/checkout?sku".$sku."=1&storeid=15245">

 

the sku is my custom field value

problems:

 

1. i cant set a default value to a custom field (what i need is a hidden textbox), so iam using dropdown field with one option (the sku)

2. the name of the field is changing between products

for one products its customfield[5] and the other one its customfield[6], how can i give this field one constant name for all of

my products ?

 

thanks

Link to comment
Share on other sites

  • 3 weeks later...

Hi David

 

I am trying a bit the same as you using a custom field i our product with a Drop Down field with only one option so I would expect this option to be the default and be always set for this product.

But the custom field parameter does not seem to return the value of the only option set in the Select Options field. In the product under Custom Fields the following are defined:

 

Field Name : productrule

Field Type : Drop Down

Select Options: dk12e1249

 

In the payment gateway code the following variables is

$customfields = $params['customfields']; # Array of custom field values for the product

$rule = $customfields['productrule'];

 

I would expect $rule to receive the value dk12e1249 but t does not

 

Does anyone know why this does not work?

Is does not make any difference if I define $rule = $params['customfields']['productrule']; which I had done originally.

 

Is there anyone with a solution to receive a string in the payment gateway module from a text set somewhere in each product?

Link to comment
Share on other sites

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.

×
×
  • 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