Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Option Type Custom Text Field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-14-2012, 06:01 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Option Type Custom Text Field

Hello,

I have added the following option to a product,

Option group name: OrderNumber
Option text: Order Number
Option group type: Custom text field
OrderBy: 1
Availability: Enabled
Options list: This type of product options has no variants

But when I am on the product details page the option does not show up so am unable to enter the order number in the text field. When proceeding to the the cart page it shows,

Selected options:
OrderNumber:

and the only way to add the order number at that point is to click on the Edit options link, insert the order number and click Update.

Why is the option not showing up on the product details page with the text box to be able to insert the order number there?

Thanks
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #2  
Old 07-14-2012, 08:29 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Option Type Custom Text Field

The only thing comes to mind is you have modified product.tpl file and options are hidden there
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 07-14-2012, 08:54 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Option Type Custom Text Field

Quote:
Originally Posted by cflsystems
The only thing comes to mind is you have modified product.tpl file and options are hidden there

Thanks Steve,
Yeah I was thinking the same thing as I have had product.tpl extensively modified.
Just had a quick look at it and seen that the following line was commented out.

Code:
{* include file="modules/Product_Options/customer_options.tpl"*}

Not sure why that would have been commented out but will have to investigate when I have more time.
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #4  
Old 07-14-2012, 10:29 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Option Type Custom Text Field

Steve,

I found out the reason that line was commented out, it is because of the way we have variants in a table.
Would you know what the if statement would be to show it only on that product?
The product page is product.php?productid=45&cat=15 so I would need something along the lines of.

{if product="productid=45&cat=15"}
{include file="modules/Product_Options/customer_options.tpl"}
{/if}

Thanks
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #5  
Old 07-14-2012, 10:43 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Option Type Custom Text Field

{if $product.productid eq 45}
show it
{else}
show something else}
{/if}

There's no need to cat as productid is unique
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
photo (07-14-2012)
  #6  
Old 07-14-2012, 10:56 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: Option Type Custom Text Field

That worked like a champ Steve, thank you.
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote
  #7  
Old 09-15-2012, 04:42 PM
 
gotpump gotpump is offline
 

eXpert
  
Join Date: Aug 2008
Posts: 272
 

Default Re: Option Type Custom Text Field

Does anyone know the code for forcing an entry in a custom text field?

I have the code for forcing a selection from drop downs like

Code:
if (document.getElementById('po447').selectedIndex == 0) { alert('Please select a Liner Pattern'); return false; } else return true;

But how do I do it for a custom text field?
__________________
X-Cart DB Version: 5
Reply With Quote
  #8  
Old 09-16-2012, 06:10 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Option Type Custom Text Field

Try
Code:
if (document.getElementById('po447').value == null || document.getElementById('po447').value == '') { alert('Please enter a value'); return false;} else return true;
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:18 AM.

   

 
X-Cart forums © 2001-2020