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

Setting Product defaults in admin

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-30-2012, 04:33 PM
 
smarta smarta is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 129
 

Default Setting Product defaults in admin

does anyone know how to change the default settings for a "new product"?

eg all my new products default to

Free Shipping |No|

I want to change it so the default is

Free Shipping |Yes|

this will save me changing it each time

there are a few other defaults I would like to change too - so if someone knows ...?
__________________
4.4.3
Reply With Quote
  #2  
Old 08-30-2012, 04:56 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Setting Product defaults in admin

You would do this by editing the template for that page. Use webmaster mode to discover the template, then simply change the default value. I am now contemplating a tutorial on this, it is such a commonly needed feature.
__________________
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
  #3  
Old 08-30-2012, 05:19 PM
 
smarta smarta is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 129
 

Default Re: Setting Product defaults in admin

great thanks

i edited
: /common_files/main/product_details.tpl

and swapped the order of the yes & no options and that changed the default

ie

<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[free_shipping]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$lng.lbl_free_shipping}:</td>
<td class="ProductDetails">
<select name="free_shipping">
<option value='N'{if $product.free_shipping eq 'N'} selected="selected"{/if}>{$lng.lbl_no}</option>
<option value='Y'{if $product.free_shipping eq 'Y'} selected="selected"{/if}>{$lng.lbl_yes}</option>
</select>
</td>
</tr>

to

<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[free_shipping]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$lng.lbl_free_shipping}:</td>
<td class="ProductDetails">
<select name="free_shipping">
<option value='Y'{if $product.free_shipping eq 'Y'} selected="selected"{/if}>{$lng.lbl_yes}</option>
<option value='N'{if $product.free_shipping eq 'N'} selected="selected"{/if}>{$lng.lbl_no}</option>

</select>
</td>
</tr>
__________________
4.4.3
Reply With Quote

The following user thanks smarta for this useful post:
totaltec (08-31-2012)
  #4  
Old 08-30-2012, 05:34 PM
 
smarta smarta is offline
 

Senior Member
  
Join Date: Aug 2008
Posts: 129
 

Default Re: Setting Product defaults in admin

I managed to chnage all I wanted to except for the Clean URL checkbox

as many products will be adde3d as "clones" I want the default to be that it makes the new name the new clean url

I have found a few lines that relte to it - but unsure how to chnge the chckbox to being "not ticked"

this on line 124

Quote:
</tr>

{include file="main/clean_url_field.tpl" clean_url=$product.clean_url clean_urls_history=$product.clean_urls_history clean_url_fill_error=$top_message.clean_url_fill_e rror tooltip_id='clean_url_tooltip_link'}

<tr>

and this on line 434

{if $new_product ne "1" and $geid eq ''}
<br />
{include file="main/clean_urls.tpl" resource_name="productid" resource_id=$productid clean_url_action="product_modify.php" clean_urls_history_mode="clean_urls_history" clean_urls_history=$product.clean_urls_history}
{/if}
__________________
4.4.3
Reply With Quote

The following 2 users thank smarta for this useful post:
tartaglia (09-05-2012), totaltec (08-31-2012)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:33 PM.

   

 
X-Cart forums © 2001-2020