duanmoen784988 2014-10-30 09:39
浏览 45
已采纳

在zencart注册/结帐中禁用Zipcode字段

Please help with this little zen-cart challenge.

Some fields especially the zip code is/are not required for the running of my online store as not all area where shipping covers has for example zip codes. The question is therefore how to disable those fields that are not necessary for signup/check in zen-cart. Can anyone help please

  • 写回答

2条回答 默认 最新

  • duanquyong8164 2014-10-31 09:16
    关注

    To make the field not required, you have to do 2 things.

    Go to includes/languages/YOUR_TEMPLATE_NAME/english.php (or your specific language file) and remove the *

    example, for Post Code:

    In english.php, it says (around line 200):

    define('ENTRY_POST_CODE', 'Post/Zip Code:');
    define('ENTRY_POST_CODE_ERROR', 'Your Post/ZIP Code must contain a minimum of ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.');
    define('ENTRY_POST_CODE_TEXT', '*');
    

    and change it to:

    define('ENTRY_POST_CODE', 'Post/Zip Code:');
    define('ENTRY_POST_CODE_ERROR', 'Your Post/ZIP Code must contain a minimum of ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.');
    define('ENTRY_POST_CODE_TEXT', ''); // *removed
    

    then, go to your www.yourshop.com/YOURadmin and in configuration> minimum values clear out the number for Post/Zip Code.

    to completely remove it from your page, you have to go to includes/templates/YOUR_TEMPLATE_NAME/tpl_modules_create_account.php and remove the code block for this specific entry. Something really similar to this:

    <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
    <?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') .
    (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />
    

    You can start reading something about customization for zencart on zencart wiki at http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates

    Hope this help.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)