欢迎各位兄弟 发布技术文章
这里的技术是共享的
Store Administration >> Configuration >> Cart Settings
and set:
Add to cart redirect: to <none>
I don't know about the AJAX but this works pretty well.
Rich来自 http://www.ubercart.org/forum/support/527/how_do_you_make_add_cart_button_not_redirect_checkout_just...
<?php$node = new stdClass();$node->title = 'Whatever';// ...
今天Drupal遇到了cache表崩溃问题,错误信息如下:
user warning: Table './tilt_db/cache' is marked as crashed and should be repaired query
这个问题似乎很多人都遇到了,参见 http://drupal.org/node/73297解决方法也比较简单,参见"Repairing a MySQL Database with phpMyAdmin"
详细步骤如下:
1)hook_validate2)hook_nodeapi时验证2)下面的方法是比较好的
function mymodule_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'artist_node_form': $form['#after_build'][] = 'mymodule_custom_after_build'; break; } } function mymodule_custom_after_build($form, &$form_state) { $form['#validate'][] = 'mymodule_custom_validation'; return($form); } function mymodule_custom_validation($form, &$form_state) { //My custom validations went here. }
在普通情况下,当用户提交节点表单后会被重定向到对应的节点页面,如果在 URL 中传入了 ?destination=path/xxx 这样的参数,提交表单后用户就会被重定向到 destination 设置的页面。
除此之外,开发人员还可以通过为节点表单设置重定向属性,来控制表单提交后的重定向路径。
下面的代码通过应用 hook_form_alter(),判断当表单ID为"story_node_form"时,设置表单的重定向属性(#redirect)
下面的方法 应该是好的<?phpfunction my_module_form_alter($form_id, &$form) {
Windows 上面安装DrushGITHUB: https://github.com/drush-ops/drush官方的安装文档:http://www.drush.org/drush_windows_installer包下载: http://www.drush.org/sites/default/files/attachments/Drush-6.0-2013-08-28-Installer-v1.0.21.msi
Linux
今天在本机安装drush-6.x-3.3,遇到了一些问题,还好搜出了解决方法。
本机 Ubuntu 10.04
下载安装drush-6.x-3.3
原文地址 http://drupal.org/node/679054
global $theme;
$theme;
php_uploadprogress.dll