Jump to content

Patryk Tchórzewski

  • Posts

  • Joined

  • Last visited

About Patryk Tchórzewski

  • Birthday 06/28/1995

Profile Information

  • Location
    Lublin, Poland
  • First Name
  • Last Name
  • Activity

Patryk Tchórzewski's Achievements


Newbie (1/14)



  1. Well after talk with @Krystian Podemski (thx for help) we found simple solution for this it was enough to change the date from the from field to 0000-00-00 00:00:00 So code for new specific price look now: $specific_price = new SpecificPrice(); $specific_price->id_product = $id_product; // choosen product id $specific_price->id_product_attribute = $id_product_attribute; // optional or set to 0 $specific_price->id_cart = $id_cart; $specific_price->from_quantity = $quantity; $specific_price->price = $price; $specific_price->reduction_type = 'amount'; $specific_price->reduction_tax = 1; $specific_price->reduction = 0; $specific_price->from = date("0000-00-00 00:00:00"); $specific_price->to = date("Y-m-d H:i:s", strtotime('+1 year')); // or set date x days from now $specific_price->id_shop = $id_shop; $specific_price->id_currency = $id_currency; $specific_price->id_country = 0; $specific_price->id_group = 0; $specific_price->id_customer = 0; $specific_price->add();
  2. Just create new cart: new Cart() and set all required fields and add products like @digitalDot said
  3. Hello @Abdulla CM, @bollydow, @Lorem Ipsum, @IronMan0803 I have similar problem but I try like code bellow: Cache::clear(); $specific_price->flushCache(); Tools::generateIndex(); DB::getInstance()->execute('RESET QUERY CACHE;'); DB::getInstance()->execute('FLUSH QUERY CACHE;'); $cart->resetStaticCache(); $cart->update(); of course without the success
  4. Hi i need show products from supplier on product page. I create override ProductController like <?php class ProductController extends ProductControllerCore { public function initContent() { parent::initContent(); if ((int)$this->product->id_supplier) { $this->context->smarty->assign( 'product_supplier', new Supplier((int)$this->product->id_supplier, (int)$this->context->language->id) ); } } } But this works only for desc, name, and others info. But didnt work for products. In product tpl i try with: {if isset($product_supplier)} {if $products} {include file="./product-list.tpl" products=$products} {/if} {/if} Its look similar to supplier.tpl Any idea how to include products from supplier?
  5. Hi i try show last order in user nav i am add code {if $orders && count($orders)} {foreach from=$orders item=order name=myLoop} {if $smarty.foreach.myLoop.first} <a class="color-myaccount" href="javascript:showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true)|escape:'html':'UTF-8'}');"> <p>{l s='From:'}</p> <p>{dateFormat date=$order.date_add full=0}</p> </a> {/if} {/foreach} {else} <p class="alert alert-warning">{l s='You have not placed any orders.'}</p> {/if} But this code working only on when open is Order history page (history.tpl) I try add code in HistoryController after history.tpl is define I try with: $this->setTemplate(_PS_THEME_DIR_.'index.tpl'); {*not-working*} $this->setTemplate(_PS_THEME_DIR_.'/modules/blockuserinfo/nav.tpl'); {*not working*} $this->setTemplate(_PS_THEME_DIR_.'modules/blockuserinfo/nav.tpl'); {*not working*} I am always see that same issue /tools/smarty/sysplugins/smarty_internal_templatebase.php(157) undefined index orders Anyone can help
  6. I found Smarty Exception - Source: Missing name I ve isntall fresh PS in smarty_template_source.php line 167 at Smarty_Template_Source::load(object(SmartyDevTemplate)) in smarty_internal_template.php line 160 at Smarty_Internal_Template->__construct(null, object(SmartyDev), null, null, null, null, null) in Smarty.class.php line 955 at Smarty->createTemplate(null, null, null, object(Smarty_Data)) in Module.php line 2302 at ModuleCore->getCurrentSubTemplate(null, null, null) in Module.php line 2347 at ModuleCore->isCached('modules/smartbloghomelatestnews/views/templates/front/smartblog_latest_news.tpl') in smartbloghomelatestnews.php line 50 at smartbloghomelatestnews->smartbloghomelatestnewsHookDisplayHome(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1)) in smartbloghomelatestnews.php line 62 at smartbloghomelatestnews->hookDisplayHome(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1)) in Hook.php line 924 at HookCore::coreCallHook(object(smartbloghomelatestnews), 'hookdisplayHome', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1)) in Hook.php line 328 at HookCore::callHookOn(object(smartbloghomelatestnews), 'displayHome', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1)) in Hook.php line 860 at HookCore::exec('displayHome') in IndexController.php line 39 at IndexControllerCore->initContent() in Controller.php line 255 at ControllerCore->run() in Dispatcher.php line 428 at DispatcherCore->dispatch() in index.php line 28 Issue on git: https://github.com/smartdatasoft/smartblog/issues/102 I looking 4 help
  7. Well almost of change is custom css/js i add custom hooks, some custom, strings (so changes is in assets and in layout tpl. On Presta my theme works perfect. I also change a tpl from ps_search... (in theme modules). I reads this article and others. But this is from GIT " Try to upload & install a theme with a module compliant with PrestaTrust" So how can i do it? I also change a line in ThemeManager.php how to looks on Github but didint help :/ I check debuger(nth)/logs(empty)/PHP test from(5.6 to 7.1) Msg when i try change them from Classic to my theme is look like: u dont have permission to disable this module. I am fuckin idiot )) try enable module with theme config, who is out of theme module )) Sorry my mistake ))
  8. Cześć )) Mam problem podczas developerki po ostatnim upgradzie Presty z tworzeniem nowych szablonów do Presty. Mianowicie nie ma problemu z instalacją tylko z włączeniem go. Pokazuje brak uprawnień do zmiany szablonu. Przeszukałem forg'a, git'a i prawdopodobnie jest to związane z PrestaTrust. Ktoś wie, może z czym to się je i od czego zacząć, żeby to poszło?
  9. Hi )) I made a theme for my client on and its works fine... BUT Im get update shop to and its gone asleep xD But i read something about PrestaTrust. But nobody write how to get started I don't want to sell it to other clients in the future. I want it to work. At the moment, after making a few major corrections due to PrestaTrust, I can't turn it on. Could someone help me deal with this mess?
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More