Jump to content

drunkenmyno

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • First Name
    Michael
  • Last Name
    schmitz

drunkenmyno's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. the blocklayered navigation is working only if i in the category with products... very weird in another shop its working... maybe the hooking are incorrectly? i already reinstalled the blocklayered module Edit: If no product is assigned to its Parent Category , the .product-list block will not shown... in some previous version of Prestashop is this working without assigning a product to its parent
  2. Hello guys, I'm using PS 1.6.0.14 and Blocklayered version 2.0.7 enabled the switch to display sub products from categories.. but the sub products dont show up either the categories?? Any idea what i can do? Edit: I see that the blocklayered-ajax.php returns a correct json but the filtersBlock doesnt show up here a screenshot
  3. Edit the product description code and view the html code... find the <img src> and add class="img-responsive" to it
  4. Hey guys, i have one question if i do a new multishop in my shop most of the modules base modules not work like Image Slider i have a to reconfigure it for each shop ... is there any way that all module settings and configuration can be used same in the new shop ? if i check Modules on the checkbox on creating a new shop it doesnt work either. Maybe over SQL a solution ?
  5. Hey , you need to Override the controllers/front/CategoryController.php: and override with this code: public function initContent() { parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); // Place here your category.tpl }
  6. You have to include in your php file define('_PS_ADMIN_DIR_', getcwd()); require(dirname(__FILE__).'/../../config/config.inc.php'); // From any folder in PrestaShop dir then you can use in your external page all functions that prestashop use
  7. Hello Community, i'm using PS 1.6.0.14 and i've created a Module which runs perfectly on the main Shop. After i enable multishop system and add one multishop my modul still works but i cant access any products it says Product not found , if i uninstall my addon all works fine in multishop i changed only Category.php for more columns to read in and CategoryController for my category.tpl which extending the original. Any Ideas ? Edit: i found the override class which makes me problems with multishop it was Product.php i overriding with this: class Product extends ProductCore { public $active_kml = 0; public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { self::$definition['fields']['active_kml'] = array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true); parent::__construct($id_product, $id_lang, $id_shop); } } if i remove this override my module works in all multishops ... hmm what is the problem ? wrong construction ? Edit 2: Solved and fixed parent::__construct($id_product, $full, $id_lang, $id_shop); is the correct one
  8. Edit: solved it by copying the object class into Class folder from ps but i cannot use it from my module folder. is there any trick ?
  9. Hello , i have a problem in my own Object class. i define with $this->className my class and the data get loaded into the the edit form fields but when i click on Save i get the message that my class cannot be found. Fatal error: Class 'GeoObject' not found in D:\path_to_shop\classes\controller\AdminController.php on line 1418 i looked into line 1418 and this is the function of loadObject so the save button click reject my already loaded Object any solution ?? this is my object class <?php class GeoObject extends ObjectModel { public $id; public $id_category; public $id_product; public $name; public $active; public static $definition = array( 'table' => 'ge_up', 'primary' => 'id', 'multilang' => false, 'multishop' => true, 'fields' => array( 'id_category' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'active' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'lang' => false, 'size' => 255), ) ); public function __construct($id = null, $id_lang = null) { Shop::addTableAssociation(self::$definition['table'], array('type' => 'shop')); parent::__construct($id, $id_lang); } } ?> Thanks
  10. Hello Prestashop Developers, I'm using PS 1.6 and trying to develop a module whichs overrides AdminCategorieController.php and adding a new Row action to the list i using this code <?php class AdminCategoriesController extends AdminCategoriesControllerCore { public function renderList() { if (isset($this->_filter) && trim($this->_filter) == '') $this->_filter = $this->original_filter; $this->addRowAction('view'); $this->addRowAction('add'); $this->addRowAction('edit'); $this->addRowAction('testaction'); $this->addRowAction('delete'); $count_categories_without_parent = count(Category::getCategoriesWithoutParent()); $categories_tree = $this->_category->getParentsCategories(); if (empty($categories_tree) && ($this->_category->id != (int) Configuration::get('PS_ROOT_CATEGORY') || Tools::isSubmit('id_category')) && (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::isFeatureActive() && $count_categories_without_parent > 1)) $categories_tree = array(array('name' => $this->_category->name[$this->context->language->id])); $categories_tree = array_reverse($categories_tree); $this->tpl_list_vars['categories_tree'] = $categories_tree; $this->tpl_list_vars['categories_tree_current_id'] = $this->_category->id; if (Tools::isSubmit('submitBulkdelete' . $this->table) || Tools::isSubmit('delete' . $this->table)) { $category = new Category(Tools::getValue('id_category')); if ($category->is_root_category) $this->tpl_list_vars['need_delete_mode'] = false; else $this->tpl_list_vars['need_delete_mode'] = true; $this->tpl_list_vars['delete_category'] = true; $this->tpl_list_vars['REQUEST_URI'] = $_SERVER['REQUEST_URI']; $this->tpl_list_vars['POST'] = $_POST; } return AdminController::renderList(); } public function initProcess() { parent::initProcess(); if ($this->action == 'testaction') { if (Tools::getIsset('cancel')) Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminCategories')); $this->action = 'testaction'; } } public function initContent() { if ($this->action == 'select_delete') $this->context->smarty->assign(array( 'delete_form' => true, 'url_delete' => htmlentities($_SERVER['REQUEST_URI']), 'boxes' => $this->boxes, )); if ($this->action == 'testaction') { $this->tpl_form = $this->initForm(); } AdminController::initContent(); } public function initForm() { $tpl_path = _PS_MODULE_DIR_ . '/mymodule/myodule.tpl'; $data = $this->context->smarty->createTemplate($tpl_path, $this->context->smarty); $this->tpl_form = $data->fetch(); } public function displayTestactionLink($token = null, $id, $name = null) { $tpl_path = _PS_MODULE_DIR_ . 'geoinformation/geo/geo.tpl'; $data = $this->context->smarty->createTemplate($tpl_path, $this->context->smarty); if (!array_key_exists('kml', self::$cache_lang)) self::$cache_lang['kml'] = $this->l('Test Action', 'Helper'); $data->assign(array( 'href' => self::$currentIndex . '&' . $this->identifier . '=' . $id . '&kml' . $this->table . '&token=' . ($token != null ? $token : $this->token), 'action' => self::$cache_lang['testaction'], 'id' => $id )); return $data->fetch(); } ... the action is added to the list but if i click on my action nothing happens it should render the tpl that i give him.. what did i forget or what did i wrong ? Thank you Edit: Btw what i want to do is i click on my action on a Category, a new form should be displayed with an table information ... i figured out how i can catch the action to call but my page is always blank
  11. Thanks it works :-)) and override tpl files in themes folder is not possible or?
  12. Hello , currently i developing a own module for prestashop, because i dont want to manually change code all the time if an update is coming. i have some issue that i dont understand. my module needs an extra comlumn in ps_category so i add them into the database then need to modify Category.php class file that i can access this column. public $active_kml = 0; and in the defintion array i add 'active_kml' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), i already have an overide class in override/classes for Category.php but it has all other contents of this file in. Now my problem is. i cant use override class from my module folder and if i put only class CategoryCore extends ObjectModel { public $active_kml = 0; public static $definition = array( 'table' => 'category', 'primary' => 'id_category', 'multilang' => true, 'multilang_shop' => true, 'fields' => array( 'nleft' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'nright' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), 'active_kml' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'is_root_category' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'position' => array('type' => self::TYPE_INT), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), // Lang fields 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128), 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128), 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), ), ); } inside the my Category.php my changes wont be added into this file .. did i something wrong ? i have read already about parent:: but i cannot use it in this way or? any help would be great
×
×
  • Create New...