Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
product content type #44
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Dec 21, 2014
1 parent 40c80e1 commit 5924d15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion userfiles/modules/content/controllers/Front.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function index($params, $config)


//$post_params['comments'] = true;

$content = get_content($post_params);


Expand Down
9 changes: 1 addition & 8 deletions userfiles/modules/content/controllers/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function index($params)
if (is_array($check_if_exist)) {
$page_info = $check_if_exist;
if (isset($check_if_exist['is_shop']) and trim($check_if_exist['is_shop']) == 1) {
// $posts_mod['subtype'] = 'product';
$posts_mod['content_type'] = 'product';
} else {
// $posts_mod['subtype'] = $check_if_exist['subtype'];
}
Expand Down Expand Up @@ -202,13 +202,6 @@ function index($params)

} elseif (isset($page_info['content_type']) and $page_info['content_type'] == 'page' and isset($page_info['subtype'])
and isset($page_info['id'])
// and $page_info['subtype'] != false
// and $page_info['subtype'] != 'post'
// and $page_info['subtype'] != 'static'
// and $page_info['subtype'] != 'dynamic'
// and $page_info['subtype'] != 'product'
// and $page_info['subtype'] != 'page'

) {
$manager = new Edit();
return $manager->index($params);
Expand Down
10 changes: 5 additions & 5 deletions userfiles/modules/posts/admin_live_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
only_admin_access();
$is_shop = false;

if (isset($params['is_shop']) and $params['is_shop'] == 'y') {
$is_shop = 1;
if (isset($params['is_shop'])) {
$is_shop = $params['is_shop'];
}

$dir_name = normalize_path(modules_path());
Expand Down Expand Up @@ -106,7 +106,7 @@
}

if (isset($params['is_shop']) and $params['is_shop'] == 'y') {
$add_post_q .= ' content_type="product" is_shop=0 ';
$add_post_q .= ' content_type="product" ';
} else {
$add_post_q .= ' ';
}
Expand Down Expand Up @@ -217,6 +217,7 @@

</script>


<div class="post-settings-holder">
<?php if (isset($params['global'])) { ?>
<a href="javascript:;"
Expand Down Expand Up @@ -248,8 +249,7 @@ class="mw-ui-btn mw-ui-btn-invert mw-ui-btn-medium pull-right"
</div>
<div class="mw-ui-box mw-ui-box-content">
<div class="tab" style="display: block">
<?php d($add_post_q ); ?>
<module type="content/manager" <?php print $add_post_q ?> no_page_edit="true" id="mw_posts_manage_live_edit" no_toolbar="true" />
<module type="content/manager" <?php print $add_post_q ?> no_page_edit="true" id="mw_posts_manage_live_edit" no_toolbar="true" />
</div>
<div class="tab" style="display:none">

Expand Down

0 comments on commit 5924d15

Please sign in to comment.