Jump to content

devein

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

4,023,598 profile views

devein's Achievements

Newbie

Newbie (1/14)

12

Reputation

  1. short: *remember to copy /override/classes/Shop.php to your prestashop path /override/classes/Shop.php* the gsitemap module with modifications needed: https://mega.co.nz/#!iBoTzIwY!FOUx_RgoVrbQyzwYCbYRL3RWFsIcCU5IhbfMV07onZE LONG: in prestashop 1.4, there are a couple of problems when you want to use latest modules from: https://github.com/PrestaShop/PrestaShop-modules 1) sometimes not all files get copied to their places when installing a new module (compare manually the git directory and the /modules/ directory - /modules/gsitemap/backwards-compatibility/* files dont get copied into respective /modules/gsitemap/(...) dirs (.zip loading from github is not parsing the link or smthn) 2) files which need to be placed in /override/classes/ are not copied there! (this is a direct answer for the problem in this topic) for example: https://github.com/PrestaShop/PrestaShop-modules/tree/master/gsitemap/override/classes file "Shop.php" this does not get copied into your servers' path: => /override/classes/Shop.php 3) sometimes the generated xml files are not seen properly by google webmaster tools or similar. possible problem: server and .htaccess files security. make sure that when you click on: you get generated .xml file there should be a couple of lines directing to other .xml's like that: <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>http://www.bristen.pl/1_en_0_sitemap.xml</loc><lastmod>2014-01-19T14:51:23+01:00</lastmod></sitemap><sitemap><loc>http://www.bristen.pl/1_pl_0_sitemap.xml</loc><lastmod>2014-01-19T14:51:23+01:00</lastmod></sitemap></sitemapindex> also, in the current git version, in the /modules/gsitemap/gsitemap.php function getContent() should have moved the "if" fragment: /* Backward compatibility */ if (_PS_VERSION_ < 1.5) { require(_PS_MODULE_DIR_.'gsitemap/backward_compatibility/backward.php'); } to top of the function. so in the result the getContent() function should look like this: public function getContent() { /* Backward compatibility */ if (_PS_VERSION_ < 1.5) { require(_PS_MODULE_DIR_.'gsitemap/backward_compatibility/backward.php'); } /* Store the posted parameters and generate a new Google Sitemap files for the current Shop */ if (Tools::isSubmit('SubmitGsitemap')) { Configuration::updateValue('GSITEMAP_FREQUENCY', pSQL(Tools::getValue('gsitemap_frequency'))); Configuration::updateValue('GSITEMAP_INDEX_CHECK', ''); Configuration::updateValue('GSITEMAP_CHECK_IMAGE_FILE', pSQL(Tools::getValue('gsitemap_check_image_file'))); $meta = ''; if (Tools::getValue('gsitemap_meta')) $meta .= implode(', ', Tools::getValue('gsitemap_meta')); Configuration::updateValue('GSITEMAP_DISABLE_LINKS', $meta); $this->emptySitemap(); $this->createSitemap(); } /* if no posted form and the variable [continue] is found in the HTTP request variable keep creating sitemap */ elseif (Tools::getValue('continue')) $this->createSitemap(); /* Empty the Shop domain cache */ if (method_exists('ShopUrl', 'resetMainDomainCache')) ShopUrl::resetMainDomainCache(); $this->context->smarty->assign(array( 'gsitemap_form' => './index.php?tab=AdminModules&configure=gsitemap&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.$this->tab.'&module_name=gsitemap', 'gsitemap_cron' => _PS_BASE_URL_._MODULE_DIR_.'gsitemap/gsitemap-cron.php?token='.substr(Tools::encrypt('gsitemap/cron'), 0, 10).'&id_shop='.$this->context->shop->id, 'gsitemap_feed_exists' => file_exists(dirname(__FILE__).'/../../index_sitemap.xml'), 'gsitemap_last_export' => Configuration::get('GSITEMAP_LAST_EXPORT'), 'gsitemap_frequency' => Configuration::get('GSITEMAP_FREQUENCY'), 'gsitemap_store_url' => 'http://'.Tools::getShopDomain(false, true).__PS_BASE_URI__, 'gsitemap_links' => Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'gsitemap_sitemap` WHERE id_shop = '.(int)$this->context->shop->id), 'store_metas' => Meta::getMetasByIdLang((int)$this->context->cookie->id_lang), 'gsitemap_disable_metas' => explode(',', Configuration::get('GSITEMAP_DISABLE_LINKS')), 'gsitemap_customer_limit' => array('max_exec_time' => (int)ini_get('max_execution_time'), 'memory_limit' => intval(ini_get('memory_limit'))), 'prestashop_version' => _PS_VERSION_ >= 1.5 ? '1.5' : '1.4', 'prestashop_ssl' => Configuration::get('PS_SSL_ENABLED'), 'gsitemap_check_image_file' => Configuration::get('GSITEMAP_CHECK_IMAGE_FILE'), 'shop' => $this->context->shop )); return $this->display(__FILE__, 'tpl/configuration.tpl'); }
  2. my solution, based on other contributions and my ideas prestashop 1.4. for categories display: product-list.tpl inside of this loop: {foreach from=$products item=product name=products} put this: {if (!isset($product.quantity_all_versions) AND $product.quantity == 0) OR (isset($product.quantity_all_versions) AND $product.quantity_all_versions == 0)} sold out! {/if} for single item display: product.tpl below </script> insert counter: {assign var='quantity' value='0'} {foreach from=$combinations key=idCombination item=combination} {assign var='quantity' value=$quantity+$combination.quantity} {/foreach} and for example after: <span class="our_price_display"> {if (isset($groups) AND $quantity == 0) OR (!isset($groups) AND $product->quantity == 0)} sold out! {/if}
  3. Try this workaround: http://www.prestashop.com/forums/topic/185059-paypal-payment-in-ps-149-does-not-redirect/?view=findpost&p=1451783 and please reply in that thread, thanks! Pawel
  4. try this workaround: http://www.prestashop.com/forums/topic/185059-paypal-payment-in-ps-149-does-not-redirect/?view=findpost&p=1451783 and please reply to that thread, thanks!
  5. I think there is a problem with the currencies for Paypal. WORKAROUND: \modules\paypal\payment\submit.php // comment out line in bold: if ($cart->id_currency != $ppPayment->getCurrency((int)$cart->id_currency)->id) { $cart->id_currency = (int)($ppPayment->getCurrency((int)$cart->id_currency)->id); $cookie->id_currency = (int)($cart->id_currency); $cart->update(); // Tools::redirect('modules/'.$ppPayment->name.'/payment/submit.php'); } result: 1. no more redirect loop 2. prestashop switches back to "native" currency on the confirm page 3. paypal presents the invoice with "native" currency. 4. all prices seem to be correct in 2. and 3. real fix would be to understand WHY it has problem, and to fix it. any real developers around here?
  6. jak włączyc ikonki banków. pogrubione - zmiany lub dodania do kodu. plik transferuj.php function preparePayment() { ... //preg_match_all("/\['(.*?)','(.*?)'/s", $curl_res, $res); preg_match_all("/\['(.*?)','(.*?)','(.*?)','(.*?)'/s", $curl_res, $res); $channels = '<p>Wybierz swój kanał płatności:</p><br/><table><tr>'; for($i=0;$i<count($res[1]);$i++) { $cell = "<td style='padding:4px'><input type='radio' id='tr_".$res[1][$i]."' name='kanal' value='".$res[1][$i]."' /><label for='tr_".$res[1][$i]."'> ".$res[2][$i]."<img src='".$res[4][$i]."' alt='".$res[2][$i]."' /></label></td>"; if($i % 2 == 1) $channels .= $cell."</tr><tr>"; else $channels .= $cell; } $channels .= '</tr></table>'; ======== fix 2: powiadamianie klienta mailem potwierdzającym płatność. klient otrzyma potwierdzenie płatności z transferuj.pl ale chciałem żeby otrzymał takie powiadomienie także ze sklepu - że sklep zaksięgował płatność. validation.php (w katalogu modułu transferuj) ... if ($status_transakcji=='TRUE') { $history = new OrderHistory(); $history->id_order = $cart_id; $history->id_employee = $res["id_employee"]; $history->changeIdOrderState(_PS_OS_PAYMENT_, $cart_id); $history->addWithemail(true); //$history->add(); } else{ $history = new OrderHistory(); $history->id_order = $cart_id; $history->id_employee = $res["id_employee"]; $history->changeIdOrderState(_PS_OS_ERROR_, $cart_id); $history->addWithemail(true); //$history->add(); }
  7. było, poszukaj po angielskim forum, wrzucałem tam nawet poprawkę do tego
  8. ja piszę tylko o tym module z GitHub. o tym że jest wbudowany jakiś moduł w wersji 0.3 w prestashopa 1.4.4.1 wlasnie sie dowiedzialem - zaraz go przetestuję, ale na preście też 1.4
  9. z tego co widziałem to moduł prestashop PayU jest napisany dla obu wersji. wszędzie są przełączniki typu: if (_PS_VERSION_ < '1.5') { ... } else { mowie o tym module + toolsach pobranych z dzisiejszego GitHuba. Także powinno działać na 1.5 a skoro na 1.5 działa to i na najnowszym 1.4 też *powinno*
  10. jak zainstalować moduł payU? po kolei problemy z instalacją i konfiguracją. 1. instalujemy poprawnie paczkę zip https://github.com/P..._prestashop_144 robimy to przez skopiowanie zawartości zip do katalogu głównego prestashop. zauważmy że plik zip ma katalogi: /modules/ /tools/ a w każdym z nich jest podkatalog "payu". także payu instaluje się i w /tools/ i w /modules/ problem #1: kopiujemy paczkę z githuba i otrzymujemy błąd: przyczyna błędu: nieskopiowanie /tools/payu/ do /tools/ na serwerze w katalogu prestashop (patrz wyżej jak poprawnie zainstalować) problem #2: "wystąpił błąd podczas procesowania zamówienia" - oprócz obrzydliwej kalki językowej (nie ma słowa "procesować" w tym kontekście, powinno być np "przetwarzać") mamy nie ustawiony poprawnie punkt płatności. konto sandbox, płatność testowa. żeby mieć poprawnie skonfigurowaną płatność testową musimy mieć konto sandbox!!! zakładanie sandboxa: konto sandbox payu które zakłada się tutaj: https://sandbox.payu...gw/register.jsp moje sklepy -> dodaj sklep w sklepie -> zakładka punkty płatności, dodaj punkt płatności checkout po utworzeniu kliknij na punkt płatności, pokażą się wazne dane oauth, klucze md5 itd i te klucze należy skopiować!! problem #3 nie mam skąd znaleźć danych URL do: przyczyna: ustawione konto płatności zwykłe a musi być "checkout". WAŻNE: te dane nie są potrzebne dla tego modułu. nie można dodać punktu płatności checkout przed wysłaniem umowy i weryfikacją konta payu. rozwiązanie: patrz zakładanie konta sandbox - problem #2 problem #4 status płatności nie zmienia się po akceptacji płatności (nawet korzystając z konta sandbox) przyczyna: payu nie aktualizuje statusu płatności (?) rozwiązanie znalezione w: https://github.com/P...p_144/issues/42 trzeba dodać w pliku prestashopa /classes/PaymentModule.php kod: if ($paymentMethod=='payu') // poprawienie tabeli payu_session o id_order Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'payu_session SET id_order = '.(int)$order->id.' WHERE id_cart = '.(int)$order->id_cart); zaraz przed: // Next ! [size=4]if ($result AND isset($order->id))[/size] [size=4](...)[/size] notatki 1. problemy płatności są logowane w tabelce mysql: "ps_log" np błąd: OPENPAYU_SIGNATURE_INVALID 47-aed382fd3a413318a9435341d4978474 -patrz rozwiązanie problemu #2 2. plik "column.tpl" to reklama - cały do skomentowania
  11. disabling tinyMCE should work for 1.4 and 1.5: edit file: tinymce.inc.js (in 1.4 it is located in \js\ directory) change the line: editor_selector : "rte", to editor_selector : "rteDISABLED", explanation: tinymce is triggered on the class "rte". changing the activator obviously disables it. one can go other way around and remove this class in the template, i think. next step would be installing CodeMirror or other syntax highlighter.
  12. unfortunatelly this breaks CCC (combine, compress and cache) functionality for joining multiple .js files into one. my solution was to: 1. delete default jquery invocation: in override/classes/FrontController.php class FrontController extends FrontControllerCore { public function setMedia() { parent::setMedia(); global $js_files; $key = array_search(_PS_JS_DIR_ . 'jquery/jquery-1.4.4.min.js', $js_files); if($key!==false){ unset($js_files[$key]); } } } 2. insert CDN script in header.tpl: <script type="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
  13. the simplest and most primitive method would be to add: {assign var="display_tax_label" value="0"} on the top of the product.tpl template you can repeat this crude method in every template where you do not desire to display the tax label ("tax incl.")
  14. well, you have gone too easy on blocklayered.js the trick is not just to duplicate whole code - you need only to duplicate code related to #pagination. so take the original .js and try to understand where line of code starts with #pagination. It can be difficult as jquery has chained functions. anyway this is the way to do it. disabling "loader" function effectively disabled whole loading of new products AFAIK - you shouldnt disable anything if you dont know what it is. after some bit more little thinking (I'm just learning like you): in jquery you can select multiple elements. so perhaps this time try not to duplicate the lines, just change the jquery selection from ('#pagination') to ('#pagination,#paginationtop') - but keep them working, this is just a example! see http://api.jquery.com/multiple-selector/ good luck! PS after weekend I will be back online
×
×
  • Create New...