Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

revision product_id typo

givanzd835c7ebfe37
diff --git a/app/controller/product/product.php b/app/controller/product/product.php
index baa42be..4db9325 100755
--- a/app/controller/product/product.php
+++ b/app/controller/product/product.php
@@ -130,7 +130,7 @@ class Product extends Base {
if ($admin) {
$revisions = model('product_content_revision');
- $revision = $revisions->get(['created_at' => $created_at, 'post_id' => $languageContent['post_id']] + $this->global);
+ $revision = $revisions->get(['created_at' => $created_at, 'product_id' => $languageContent['product_id']] + $this->global);
if ($revision && isset($revision['content'])) {
$languageContent['content'] = $revision['content'];
diff --git a/app/template/components/menu.tpl b/app/template/components/menu.tpl
old mode 100755
new mode 100644
index 8ece47d..61562b0
--- a/app/template/components/menu.tpl
+++ b/app/template/components/menu.tpl
@@ -33,19 +33,43 @@ if (isset($this->_component['menu']) && isset($this->_component['menu'][$_menu_i
@category|data-v-id = $category['menu_item_id']
@category|data-v-component = 'menu'
@category|data-v-type = 'menu-item'
-
+
@category|before = <?php
foreach($_categories as $id => $category) {
if (isset($category['parent_id']) && ($category['parent_id'] == $parent_id)) {
?>
+ @category|addNewAttribute = <?php if (isset($category['options']) && !$vvveb_is_page_edit)
+ echo 'style="';
+ if (isset($category['options']['width'])) echo 'position:static;';
+ echo '"';
+ ?>
+
+ @category > a|addNewAttribute = <?php if (isset($category['options']) && !$vvveb_is_page_edit)
+ echo 'style="';
+ if (isset($category['options']['padding-x'])) echo 'padding-left:' . $category['options']['padding-x'] . 'px;padding-right:' . $category['options']['padding-x'] .'px;';
+ if (isset($category['options']['padding-y'])) echo 'padding-top:' . $category['options']['padding-y'] . 'px;padding-bottom:' . $category['options']['padding-y'] .'px;';
+ echo '"';
+ ?>
+
+
//catch all data attributes
@category [data-v-menu-item-*]|innerText = $category['@@__data-v-menu-item-(*)__@@']
@category [data-v-menu-item-content] = <?php echo($category['content'] ?? '');?>
@category [data-v-menu-item-url]|href = $category['url']
- @category [data-v-menu-item-img]|src = $category['images'][0]
+ @category [data-v-menu-item-img]|src = $category['img']
+ @category [data-v-menu-item-img]|width = $category['options']['img_width']
+ @category [data-v-menu-item-img]|height = $category['options']['img_height']
+ @category [data-v-menu-item-recursive]|addNewAttribute = <?php if (isset($_categories[$parent_id]['options']) && !$vvveb_is_page_edit)
+ echo 'style="';
+ if (isset($_categories[$parent_id]['options']['columns'])) echo 'column-count:' . $_categories[$parent_id]['options']['columns'] .';';
+ if (isset($_categories[$parent_id]['options']['width'])) echo 'width:' . $_categories[$parent_id]['options']['width'] .'%;';
+ if (isset($_categories[$parent_id]['options']['sub-padding-x'])) echo 'padding-left:' . $_categories[$parent_id]['options']['sub-padding-x'] . 'px;padding-right:' . $_categories[$parent_id]['options']['sub-padding-x'] .'px;';
+ if (isset($_categories[$parent_id]['options']['sub-padding-y'])) echo 'padding-top:' . $_categories[$parent_id]['options']['sub-padding-x'] . 'px;padding-bottom:' . $_categories[$parent_id]['options']['sub-padding-x'] .'px;';
+ echo '"';
+ ?>
@category|append = <?php
if ($category['children'] > 0 && isset($generate_menu)) {