شاطی رودخانه ای به سوی دنیای متن باز

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد

شاطی رودخانه ای به سوی دنیای متن باز

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد

پروژه ها و برنامه ها و سمینار های اینجانب به صورت آزاد در این سایت قرار می گیرد. امیدوارم با این کار سرآغازی برای آزادی در مرز های دانش باشم .

طبقه بندی موضوعی
کلمات کلیدی
آخرین مطالب

۲۵ مطلب با موضوع «prestashop» ثبت شده است

۰۶
مهر ۹۴

ProductSale::getBestSalesLight

 

خیلی ساده ابتدا نام کلاس و سپس نام تابع را در ماژول می اوریم

۰ نظر موافقین ۰ مخالفین ۰ ۰۶ مهر ۹۴ ، ۲۱:۰۰
مبین
۰۵
مهر ۹۴

۱.اضافه کردن install

            'HOOK_SLIDESHOWLM' => Hook::exec('slideshowlm'),

۲.اضافه کردن به کنترلر controller

IndexController.php مثلا

 

        $this->context->smarty->assign(array('HOOK_HOME' => Hook::exec('displayHome'),
            'HOOK_HOME_TAB' => Hook::exec('displayHomeTab'),
            'HOOK_HOME_TAB_CONTENT' => Hook::exec('displayHomeTabContent'),
            'HOOK_SLIDESHOWLM' => Hook::exec('slideshowlm'),
        ));

 

۳.اضافه کردن به index.tpl

 

{if isset($HOOK_SLIDESHOWLM)}{$HOOK_SLIDESHOWLM} {/if}

۰ نظر موافقین ۰ مخالفین ۰ ۰۵ مهر ۹۴ ، ۱۷:۲۸
مبین
۲۶
شهریور ۹۴

    public function hookHeader($params) {

        $rand = mt_rand(1, 1000);
        $namefile = "dycss" . $rand . ".css";
        $myfile = fopen("modules/lmslideshow/css/" . $namefile, "w");
        $txt = "
        h1 {
            color: maroon;
            margin-left: 40px;
        }
        ";
        fwrite($myfile, $txt);
        fclose($myfile);

        $this -> context -> controller -> addCSS(($this -> _path) . 'css/' . $namefile, 'all');
        $this -> context -> controller -> addCSS(($this -> _path) . 'css/boom.css', 'all');
        $this -> context -> controller -> addJS(($this -> _path) . 'js/boom.js');
    }

۰ نظر موافقین ۰ مخالفین ۰ ۲۶ شهریور ۹۴ ، ۱۵:۳۵
مبین
۲۶
شهریور ۹۴

این کار روش های مختلفی دارد ولی یک روش آن به شرح زیر است :

 

اضافه کردن hook header  در هنگام install

!$this -> registerHook('home')

 

اضافه کردن به هوک header

 

    public function hookHeader($params)
    {
        $this->context->controller->addCSS(($this->_path).'boom.css', 'all');
        $this->context->controller->addJS(($this->_path).'js/boom.js');
    }

 

توجه کنید که فایل های boom باید وجود داشته باشند و خالی نباشند.

۰ نظر موافقین ۰ مخالفین ۰ ۲۶ شهریور ۹۴ ، ۱۲:۲۹
مبین
۲۵
شهریور ۹۴

http://blog.belvg.com/prestashop-modules-stylization.html

۰ نظر موافقین ۰ مخالفین ۰ ۲۵ شهریور ۹۴ ، ۱۹:۴۵
مبین
۲۵
شهریور ۹۴

در پرستاشاپ می توان مدل برای ارتباط با دیتابیس به طور کلی نوشت و مبحث چند زبانی را کاملا با  lang , multilang= true _ حل کرد

و برای ارتباط های چند گانه و نمایش در فرم ادمین باید جداگانه کوئری زد .

 


        $this->_select = '  cl.* ';
        $this->_join .=
          'LEFT JOIN `ps_category_lang`  as cl ON (a.`id_category` = cl.`id_category` )
          ';    
        
        // add action on list   
        $this->addRowAction('edit');
        $this->addRowAction('delete');
        $this->addRowAction('details');
        // create list
        $this->fields_list = array(
            'id_lmslideshow' => array(
                'title' => $this->l('ID'),
                'align' => 'center',
                'width' => 25
            ),
            'name' => array(
                'title' => $this->l('ID Category'),
                'width' => 25,
                'filter_key' => 'a!name',
            )
        );

 

 

و برای قسمت ویرایش از option استفاده نمود

 


        $this->_select = '  cl.* ';
        $this->_join .=
          'LEFT JOIN `ps_category_lang`  as cl ON (a.`id_category` = cl.`id_category` )
          ';    
        
        // add action on list   
        $this->addRowAction('edit');
        $this->addRowAction('delete');
        $this->addRowAction('details');
        // create list
        $this->fields_list = array(
            'id_lmslideshow' => array(
                'title' => $this->l('ID'),
                'align' => 'center',
                'width' => 25
            ),
            'name' => array(
                'title' => $this->l('ID Category'),
                'width' => 25,
                'filter_key' => 'a!name',
            )
        );

۰ نظر موافقین ۰ مخالفین ۰ ۲۵ شهریور ۹۴ ، ۱۶:۳۰
مبین
۲۴
شهریور ۹۴

https://books.google.com/books?id=BsSiBQAAQBAJ&pg=PT178&lpg=PT178&dq=prestashop+_join%28%29&source=bl&ots=JCdV6nBcjq&sig=5jTC4Xeeu1WvfhMJOEMStG3TYrk&hl=en&sa=X&ved=0CDMQ6AEwAmoVChMIl_D6msP5xwIVw9YaCh3o5wD6#v=snippet&q=ObjectModel&f=false

 

 

http://www.amazon.com/PrestaShop-Module-Development-Fabien-Serny-ebook/dp/B00QFBNXIO
 

 

https://www.packtpub.com/web-development/prestashop-module-development

 

 

Prestashop MVC Developer Guide

 

 

http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=9781326399085

 

https://books.google.com/books?id=0hx7CgAAQBAJ&pg=PA127&lpg=PA127&dq=fields_list+filter_key&source=bl&ots=dETGKy0mZM&sig=RicAKHDjjUT4doEIqdKq__FsgGI&hl=en&sa=X&ved=0CFsQ6AEwCWoVChMIiI-e1rn7xwIVgZwsCh1jvAdW#v=onepage&q=fields_list%20filter_key&f=false

۰ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۲۲:۱۰
مبین
۲۴
شهریور ۹۴

  global $smarty, $cookie, $link;
 
  $id_customer = (int)$params['cookie']->id_customer;
  $id_group = $id_customer ? Customer::getDefaultGroupId($id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_;
  $id_lang = (int)$params['cookie']->id_lang;
  $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
  SELECT c.*, cl.*
  FROM `'._DB_PREFIX_.'category` c
  LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.')
  LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
  WHERE level_depth > 1 And level_depth < 3
  AND c.`active` = 1
  AND cg.`id_group` = '.$id_group.'
  ORDER BY `level_depth` ASC, c.`position` ASC');
  $category = new Category(1);
  $nb = intval(Configuration::get('HOME_categories_NBR'));
 
    global $link;
                 $this->context->smarty->assign(array(
                 'categories' => $result, Category::getRootCategories(intval($params['cookie']->id_lang), true),
                 'link' => $link));

۰ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۲۰:۰۶
مبین
۲۴
شهریور ۹۴


{foreach $categorys as $category}
   {$category.name}
   <img  src="{$link->getCatImageLink($category.link_rewrite, $category.id_category )|escape:'html':'UTF-8'}"  />
{/foreach}

۰ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۱۸:۳۵
مبین
۲۴
شهریور ۹۴
<ul>
{foreach $myPeople as $value}
   <li>{$value@key}: {$value}</li>
{/foreach}
</ul>
۰ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۱۷:۴۶
مبین
۲۴
شهریور ۹۴

http://blog.belvg.com/objectmodel-activerecord-in-prestashop.html

۰ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۱۷:۰۶
مبین
۲۴
شهریور ۹۴

http://flowcoding.com/hook-list

۱ نظر موافقین ۰ مخالفین ۰ ۲۴ شهریور ۹۴ ، ۱۷:۰۶
مبین
۲۳
شهریور ۹۴
Configuration::get('PS_LANG_DEFAULT')

 

   $parent_id = Configuration::get('PS_HOME_CATEGORY');
۰ نظر موافقین ۰ مخالفین ۰ ۲۳ شهریور ۹۴ ، ۱۹:۴۷
مبین
۲۳
شهریور ۹۴

http://doc.prestashop.com/display/PS16/Using+the+HelperForm+class

۰ نظر موافقین ۰ مخالفین ۰ ۲۳ شهریور ۹۴ ، ۱۸:۴۱
مبین
۲۳
شهریور ۹۴

http://nemops.com/prestashop-categories-second-image/#.VfbOs7MabCJ

۰ نظر موافقین ۰ مخالفین ۰ ۲۳ شهریور ۹۴ ، ۱۸:۳۷
مبین
۲۳
شهریور ۹۴

http://stackoverflow.com/questions/26582252/display-all-categories-on-product-page-prestashop

۰ نظر موافقین ۰ مخالفین ۰ ۲۳ شهریور ۹۴ ، ۱۸:۰۵
مبین
۲۳
شهریور ۹۴

https://www.prestashop.com/forums/topic/278116-tutorial-displaying-list-of-categories-and-products-in-any-tpl/

۰ نظر موافقین ۰ مخالفین ۰ ۲۳ شهریور ۹۴ ، ۱۷:۰۹
مبین
۲۲
شهریور ۹۴
$product = new Product($id);
$categories = $product->getCategories();


To set them:
 

$product = new Product($id);
$success = $product->updateCategories(array('1','3','4'))
$product->id_category_default = '3';
$product->update();

 

https://www.prestashop.com/forums/topic/247361-solved-altering-products-categories-in-database/

 

۰ نظر موافقین ۰ مخالفین ۰ ۲۲ شهریور ۹۴ ، ۱۹:۱۹
مبین
۲۱
شهریور ۹۴

http://flowcoding.com/prestashop-create-first-module

 

http://www.technoreply.com/how-to-create-a-prestashop-1-5-module/

https://github.com/jevin/Prestashop-Module-Skeleton

۰ نظر موافقین ۰ مخالفین ۰ ۲۱ شهریور ۹۴ ، ۲۰:۵۲
مبین
۰۹
شهریور ۹۴

p() is the main method, and d() works the same way, except that it calls the die() method instead of returning the variable:

 

of that, PrestaShop defines the ppp() and ddd() methods, which are respectively the aliases of p() and d(). They work exactly the same, but are often easier to search and find in a huge block of code.

 

ppp()

ddd()

 

These debug methods are not activated by default. To activate them, you must enable the Debug mode, by setting _PS_MODE_DEV_ to true (see above).

 

http://doc.prestashop.com/display/PS16/Setting+Up+Your+Local+Development+Environment

۰ نظر موافقین ۰ مخالفین ۰ ۰۹ شهریور ۹۴ ، ۱۶:۱۴
مبین
۰۹
شهریور ۹۴

Displaying error messages

PrestaShop's default settings prevent the customer to see any server error message or any debugging code.

You, on the other hand, need this information in order to correct any potential mistake in your code. To that end, open the /config/defines.inc.php file, and edit it to set _PS_MODE_DEV_ to true:

/* Debug only */
define('_PS_MODE_DEV_', true);
 
 
http://doc.prestashop.com/display/PS16/Setting+Up+Your+Local+Development+Environment
 
 
۰ نظر موافقین ۰ مخالفین ۰ ۰۹ شهریور ۹۴ ، ۱۶:۰۸
مبین
۰۹
شهریور ۹۴

Go to the "Performances" page under the "Advanced parameters" menu to change the following Smarty settings:

  • Template cache: switch it to "Force compilation".
  • Cache: disable it.

 

http://doc.prestashop.com/display/PS16/Setting+Up+Your+Local+Development+Environment

 

 

۰ نظر موافقین ۰ مخالفین ۰ ۰۹ شهریور ۹۴ ، ۱۶:۰۷
مبین
۰۹
شهریور ۹۴

you can find php.ini in

sudo gedit /etc/php5/apache2/php.ini

http://ubuntuforums.org/showthread.php?t=1097306

۰ نظر موافقین ۰ مخالفین ۰ ۰۹ شهریور ۹۴ ، ۱۵:۳۹
مبین
۰۸
شهریور ۹۴
To do this, follow these steps:
  1. Log in to PrestaShop as the administrator.
  2. On the top menu bar, click Preferences, and then click SEO & URLs.
  3. Scroll down to the Set shop URL section.
  4. In the Shop domain text box, type the new domain name that you want PrestaShop to use.

 

https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/prestashop2/changing-the-prestashop-url-settings

۰ نظر موافقین ۰ مخالفین ۰ ۰۸ شهریور ۹۴ ، ۱۸:۰۲
مبین
۰۷
شهریور ۹۴

http://nemops.com/category/tutorials/development/

 

http://doc.prestashop.com/display/PS16/Developer+Guide

 

http://doc.prestashop.com/display/PS16/Designer+Guide

 

http://forum.shopkeeper.ir

 

http://forum.prestatools.ir/

 

http://forum.persiantools.com/

 

http://www.custommyself.com/how-to-create-a-module-with-prestashop/

 

 

 

۰ نظر موافقین ۰ مخالفین ۰ ۰۷ شهریور ۹۴ ، ۱۸:۰۶
مبین