This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form_id | |
= commerce_cart_add_to_cart_form_id(array($product->product_id)); | |
$line_item = commerce_product_line_item_new($product); | |
$line_item->data['context']['product_ids'] = array($product->product_id); | |
$form = drupal_get_form($form_id, $line_item); | |
// render your $form somewhere | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// for example node type = product_display | |
$type = 'product_display'; | |
$nodes = node_load_multiple(array(), array('type' => $type)); | |
foreach ($nodes as $node){ | |
$title = $node->title; | |
print $title; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo get_bloginfo('name');?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo get_bloginfo('description');?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file: sendmail.php | |
<?php | |
session_start(); | |
if (isset($_POST["send"])) { | |
$from = $_POST["from"]; | |
$to = $_POST["to"]; | |
$subject = $_POST["subject"]; | |
$message = $_POST["message"]; | |
$_SESSION["from"] = $from; | |
$_SESSION["to"] = $to; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = drupal_lookup_path('alias', 'taxonomy/term/'.$known_tid, $lang_code); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Меняем в файле /home/ohranactr/public_html/catalog/controller/common/header.php | |
это: | |
foreach ($children as $child) { | |
$filter_data = array( | |
'filter_category_id' => $child['category_id'], | |
'filter_sub_category' => true | |
); | |
$children_data[] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "keys": ["tab"], "command": "expand_abbreviation_by_tab", "context": | |
[ | |
{ | |
"operand": "source.css, source.sass, source.less, source.scss, source.stylus, source.postcss, source.jade, text.jade, text.slim, text.xml, text.html - source, text.haml, text.scala.html, source string", | |
"operator": "equal", | |
"match_all": true, | |
"key": "selector" | |
}, | |
{ | |
"operand": "storage.type.templatetag.django", |