Jump to content

Ajax Configuration Options Descriptions


CobbyJ

Recommended Posts

Hello, iv been trying to add descriptions in the configuration option like the Additional Required Information. just through mysql. iv edited the following

 

iv called it configinfo iv added the structure in the mysql as well in the tblproductconfigoptions table. then im just adding in manualy the descrptions in to the the table.

 

here is the productconfig.tpl file

 

https://secure.immortal-servers.com/order/templates/productconfig.tpl

 

everything should be fine.

 

https://secure.immortal-servers.com/order/?pid=1&skip=1

 

productconfig.tpl

 

-------------------------

{if $configoption.optiontype eq 1}

<select name="configoption[{$configoption.id}]" onchange="recalctotals()">

{foreach key=num2 item=options from=$configoption.options}

<option value="{$options.id}"{if $configoption.selectedvalue eq $options.id} selected="selected"{/if}>{$options.nameonly}</option>

{/foreach}

</select>

{$configoption.configinfo}{elseif $configoption.optiontype eq 2}

{foreach key=num2 item=options from=$configoption.options}

<input type="radio" name="configoption[{$configoption.id}]" value="{$options.id}"{if $configoption.selectedvalue eq $options.id} checked="checked"{/if} onclick="recalctotals()">

{$options.name}

<br />

{/foreach}

{elseif $configoption.optiontype eq 3}

<input type="checkbox" name="configoption[{$configoption.id}]" value="1"{if $configoption.selectedqty} checked{/if} onclick="recalctotals()"> {$configoption.options.0.name}

{elseif $configoption.optiontype eq 4}

<input type="text" name="configoption[{$configoption.id}]" value="{$configoption.selectedqty}" size="5" onchange="recalctotals()">

x {$configoption.options.0.name}

{/if}

----------------

 

i have also edited the index.php in the order folder

 

---------------------------------------

 

# Validate config option quantity restrictions

if (is_array($configoption)) {

foreach ($configoption AS $opid=>$opid2) {

$result = select_query("tblproductconfigoptions","",array("id"=>$opid));

$data = mysql_fetch_array($result);

$optionname = $data["optionname"];

$configinfo = $data["configinfo"];

$optiontype = $data["optiontype"];

$qtyminimum = $data["qtyminimum"];

$qtymaximum = $data["qtymaximum"];

 

-----------------------------------------------------------------------------------------

 

still cant see where im going wong, any idea is there any other files i have missed? the descptions arnt showing up at all

 

any help would be great.

 

Regards

Chris Murrell

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.

  • 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