Jump to content

studioneko

Members
  • Posts

    40
  • Joined

  • Last visited

Profile Information

  • Activity
    Freelancer

Recent Profile Visitors

7,241,993 profile views

studioneko's Achievements

Newbie

Newbie (1/14)

28

Reputation

  1. Hey David, thanks for your code Works like a charm on presta 1.6.x Just a small addition: we added a class="datepicker" to the input to force the date picker to show. When you select only a date, without specifying a time, the database saves it with a 00:00:00 value {if $product->date_add} <div class="form-group"> <label class="control-label col-lg-3"></td> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Change date for "product new from".'}"> {$bullet_common_field} {l s='New from'} </span> </label> <div class="col-lg-3"> <input type="text" id="date_add" class="datepicker" name="date_add" value="{$product->date_add|escape:html:'UTF-8'}" /> </div> </div> {/if}
  2. Scusate, leggo solo ora. No, le spese di spedizione di PayPal servono a sovrascrivere quelle di default dell'e-commerce. Servono per chi non ha soluzioni integrate e/o si sviluppa autonomamente un sistema di pagamento con PayPal. Il mio consiglio è di non utilizzare le spese di spedizione su PayPal ma di lavorare con Prestashop
  3. Scusa, leggo solo ora 1 - Se dopo aver configurato il modulo c'è un simbolino giallo con punto esclamativo significa che ci sono delle "missing dependencies", nello specifico si tratta del modulo Backward Compatibility. Il modulo è fatto apposta per la versione 1.4.x di prestashop, lo trovi qui http://addons.prestashop.com/it/moduli-amministrazione/6222-backward-compatibility.html 2 - Il pagamento express funziona esattamente nel modo che dici tu Si limita a prendere il prezzo del prodotto sulla pagina e creare un ordine lampo. N.B. non l'ho personalmente mai usato, so come funziona in teoria, ma in pratica non ti so dire come si comporta con il calcolo delle spedizioni, credo si debbano settare sull'account paypal (paypal.it -> profilo -> strumenti di vendita -> calcolo delle spese di spedizione) Oggi è il 3 dicembre, gli ordini tramite PayPal arrivano su tutti gli eCommerce che ho in gestione, quindi direi (con grattata precauzionale) che va tutto bene
  4. Il problema del calcolo delle spese di spedizione e dell'override dell'indirizzo sono due cose differenti. La buona notizia è che entrambi si possono risolvere. SPEDIZIONI NON CONTEGGIATE DA PAYPAL - Andate su www.paypal.it e loggate con i vostri dati venditore - Cliccate su "Profilo" nel menu in alto - Cliccate su "Strumenti di Vendita" nel menu a sinistra - Nell'elenco delle opzioni a disposizione, trovate la riga "Calcolo delle Spese di Spedizione"e cliccate su "Aggiorna" - Una volta aperta la schermata, ASSICURATEVI che la valuta attuale sia "Euro", e cliccate SOLO sul pulsante "Cancella Impostazioni". In questo modo cancellerete la cache del vostro conto PayPal, che può incasinarsi in seguito ad update del modulo e/o update di PayPal, e il sistema ricomincerà a conteggiare le spedizioni nel modo giusto. N.B. L'assistenza PayPal consiglia di impostare manualmente le spese di spedizione con le fasce di costo sempre presenti in quella pagina, ma in questo modo rendete inutilizzabili eventuali voucher di spedizione gratuita generati da Prestashop. A voi la scelta. OVERRIDE INDIRIZZO ATTENZIONE! Queste modifiche sono prese dalle varie soluzioni proposte da altri utenti nel forum Prestashop, sono state da me testate personalmente e hanno risolto il problema ove si presentasse, ma USATELE A VOSTRO RISCHIO E PERICOLO: non mi prendo responsabilità con eventuali incompatibilità con customizzazioni del modulo PayPal o moduli terzi. I nuovi moduli PayPal sovrascrivono l'indirizzo di spedizione in modo da sincronizzare eventuali modifiche apportate dal cliente nella schermata di PayPal. Buona idea? Sì, se si considera che così aumenta la casistica della protezione venditori (inapplicabile se i dati di spedizione e quelli PayPal non coincidono) e no, se si considera che il cliente potrebbe voler inserire due indirizzi diversi per spedizione e fatturazione. Anyway. PAYPAL PRO Il processo di override può essere bypassato facilmente con... un override Il file da modificare (meglio se salvate in override module nella cartella del vostro tema) è /modules/paypal/views/templates/hook/integral_evolution_payment.tpl alla riga 94 trovate questa riga <input type="hidden" name="address_override" value="true" /> che si deve modificare in questo modo <input type="hidden" name="address_override" value="false" /> in questo modo disattiverete l'override dell'indirizzo da parte di PayPal. PAYPAL STANDARD Un po' più rognoso in questo caso, in quanto dobbiamo andare a modificare i file .php che verranno inevitabilmente sovrascritti ad ogni aggiornamento del modulo, costringendoci a modificare nuovamente il tutto. Aprite il file modules/paypal/express_checkout/payment.php e andate a pescare le righe da 204 a 213, ovvero if ((!$address || !$address->id) && $customer->id) {//If address does not exists, we create it $address = setCustomerAddress($ppec, $customer); $address->add(); } else if ($customer->id) {//If address exists, we update it with new informations $address = setCustomerAddress($ppec, $customer, $address->id); $address->save(); } I commenti nel file sorgente spiegano bene a cosa serva questo condizionale... che è anche all'origine dei nostri problemi. Dobbiamo commentare le righe di aggiunta e salvataggio dell'indirizzo fornito da PayPal, in questo modo: if ((!$address || !$address->id) && $customer->id) {//If address does not exists, we create it $address = setCustomerAddress($ppec, $customer); //$address->add(); } else if ($customer->id) {//If address exists, we update it with new informations $address = setCustomerAddress($ppec, $customer, $address->id); //$address->save(); } Spero di esservi stato utile, fatemi sapere se i problemi con PayPal si risolvono
  5. Dunque: Prestashop 1.4.x Scaricatevi la versione aggiornata del modulo 3.8.1 - Hanno effettuato un aggiornamento appositamente per le versioni 1.4.x e per correggere anche questo bug. http://addons.prestashop.com/fr/modules-paiement-prestashop/1748-paypal.html Prestashop 1.5.x - 1.6.x - Assicuratevi di essere in modalità LIVE e NON SANDBOX - Assicuratevi che le API che avete specificato siano della modalità LIVE, la modalità Sandbox ha API differenti - Assicuratevi che il vostro conto PayPal sia sbloccato ed abilitato alla ricezione dei pagamenti - L'errore 10002 si manifesta esclusivamente quando si utilizza la modalità Express Checkout. Provate a disattivarla e vedere se risolve il problema --- Se risolve il problema, allora le vostre credenziali API sono sballate, senza ma, senza se, senza percome, etc. --- Se non risolve il problema, allora dovete per forza di cose contattare l'assistenza PayPal, in quanto ci sono dei problemi con il vostro conto Business
  6. you can display the current title of your cms page In the CMS page itself: {$cms->meta_title} In the CMS Archive page: {$cmspages.meta_title}
  7. Luckily, I had post reply notification by email on I'm using the standard homefeatured module included in prestashop, I did override it with my custom html + css and added this php line in homefeatured.php to show products in random order everytime the page is refreshed: find this function in homefeatured.php function hookHome($params) { global $smarty; $category = new Category(1, Configuration::get('PS_LANG_DEFAULT')); $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); $products = $category->getProducts((int)($params['cookie']->id_lang), 1, ($nb ? $nb : 10)); $smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize('home'))); return $this->display(__FILE__, 'homefeatured.tpl'); } and replace it with function hookHome($params) { global $smarty; $category = new Category(1, Configuration::get('PS_LANG_DEFAULT')); $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); $products = $category->getProducts((int)($params['cookie']->id_lang), 1, ($nb ? $nb : 10)); /* Shuffle featured products */ shuffle($products); /* End of Shuffle featured products */ $smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize('home'))); return $this->display(__FILE__, 'homefeatured.tpl'); } Hope it helps : )
  8. Better to override (1.4.8 - 1.4.9) create a new file and copy paste the following: <?php class Manufacturer extends ManufacturerCore { public static function getManufacturers($getNbProducts = false, $id_lang = 0, $active = true, $p = false, $n = false, $all_group = false) { if (!$id_lang) $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); $sql = 'SELECT m.*, ml.`description`'; $sql.= ' FROM `'._DB_PREFIX_.'manufacturer` m LEFT JOIN `'._DB_PREFIX_.'manufacturer_lang` ml ON (m.`id_manufacturer` = ml.`id_manufacturer` AND ml.`id_lang` = '.(int)($id_lang).') '.($active ? ' WHERE m.`active` = 1' : ''); $sql.= ' ORDER BY m.`name` ASC'.($p ? ' LIMIT '.(((int)($p) - 1) * (int)(1000)).','.(int)(1000) : ''); $manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql); if ($manufacturers === false) return false; if ($getNbProducts) { $sqlGroups = ''; if (!$all_group) { $groups = FrontController::getCurrentCustomerGroups(); $sqlGroups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); } foreach ($manufacturers as $key => $manufacturer) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT p.`id_product` FROM `'._DB_PREFIX_.'product` p LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`) WHERE m.`id_manufacturer` = '.(int)($manufacturer['id_manufacturer']). ($active ? ' AND p.`active` = 1 ' : ''). ($all_group ? '' : ' AND p.`id_product` IN ( SELECT cp.`id_product` FROM `'._DB_PREFIX_.'category_group` cg LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) WHERE cg.`id_group` '.$sqlGroups.')')); $manufacturers[$key]['nb_products'] = sizeof($result); } } $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS'); for ($i = 0; $i < sizeof($manufacturers); $i++) if ($rewrite_settings) $manufacturers[$i]['link_rewrite'] = Tools::link_rewrite($manufacturers[$i]['name'], false); else $manufacturers[$i]['link_rewrite'] = 0; return $manufacturers; } } Change the number 1000 to any number fitting your needs (the number of total objects that you want to be displayed in manufacturer-list.tpl) Save as Manufacturer.php in your /override/classes/ folder Done : )
  9. - To modify the time after our add_ok div disappears: open the ajax-cart.js and modify the "delay" value in milliseconds $(this).next('.add_ok').fadeIn(300).delay(6500).fadeOut(500); delay(5000) = 5 seconds delay before it disappears delay(10000) = 10 seconds delay before it disappears and so on... The jQuery in product-list.tpl checks the current scroll-height of the browser and shows our "go_to_cart" div only if our window has been scrolled for a certain amount of pixels. That totally depends on your theme's layout. For me, the cart wasn't anymore visible after the window has been scrolled for about 500 pixels, so I used that value in the conditional if( x > 500 ) You can change it to any value, for example: The "Check Your Cart" message shows up after the widow has been scrolled for 200px if( x > 200 ) The "Check Your Cart" message shows up after the widow has been scrolled for 600px if( x > 600 ) and so on... Enjoy : )
  10. Warning! This hack has been tested on 1.4.x only! The live example has been modified since the client asked for a fixed "added to cart" notification Hi everyone, I recently modified the blockcart module to show a "Product added to Cart" notification whenever the user clicks on the "Add to Cart" button, useful when your product, search or manufacturer page is full of products and the customer has to scroll down a lot Just want to share this little hack You can see a live example on my latest project http://www.farmasubito.com/2-cosmetici Just scroll a bit down and try to add a product to cart To do that, we are goin to modify 2 files - ajax-cart.js (from your blockcart module's folder) - product-list.tpl (from your theme's folder) Let's create an override file first. - Open the ajax-cart.js located in modules/blockcart - Create the module's override folder mytheme/js/modules/blockcart and save a copy of the ajax-cart.js there If you want you can just edit the original ajax-cart.js file, just be sure to backup it if you are updating the blockcart module in the future Open the ajax-cart.js, on line 31 you will find //override every button in the page in relation to the cart overrideButtonsInThePage : function(){ //for every 'add' buttons... $('.ajax_add_to_cart_button').unbind('click').click(function(){ var idProduct = $(this).attr('rel').replace('ajax_id_product_', ''); if ($(this).attr('disabled') != 'disabled') ajaxCart.add(idProduct, null, false, this); return false; }); Replace it with //override every button in the page in relation to the cart overrideButtonsInThePage : function(){ //for every 'add' buttons... $('.ajax_add_to_cart_button').unbind('click').click(function(){ var idProduct = $(this).attr('rel').replace('ajax_id_product_', ''); if ($(this).attr('disabled') != 'disabled') ajaxCart.add(idProduct, null, false, this); $(this).next('.add_ok').fadeIn(300).delay(6500).fadeOut(500); return false; }); Open the product-list.tpl and find the "add to cart button" line <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> After that line, let's add our "Product added to cart" notification, so that it looks like <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> <div class="add_ok">{l s='Product Added to Cart'} <div class="go_to_cart">{l s='Check Your Cart'}</div> </div> At the end of product-list.tpl, find the closing {/if} <!-- /Products list --> {/if} ...and add there the jQuery snippet handling our "Check Your Cart" animation, so that it looks like <!-- /Products list --> <script type="text/javascript"> function scrollWin(){ $('html, body').animate({ scrollTop: $("#columns").offset().top }, 1000); } $('.go_to_cart').click(function(){ scrollWin(); }); $(window).scroll(function(){ var x = $(window).scrollTop(); if( x > 500 ){ $('.go_to_cart').show(); } else { $('.go_to_cart').hide(); } }); </script> {/if} The next part is up to you, since you should style our "add_ok" and "go_to_cart" divs with CSS To handle the "hide & seek" animations, the basic CSS must be .add_ok { display: none } .go_to_cart { display: none } [continues]
  11. Doesn't work properly on presta 1.4.8.2 CSS does actually have version, but the browser don't download it every time and, if combined with BO caching, it may cause header refresh problems
  12. I confirm all of the above. Moving products with the drag & drop completely screwed up one of my shops and forced me to unistall/reinstall prestashop
  13. Hi everyone, I have a fresh and clean prestashop installation, I added about 50 products with default order by date add - descending, 10 products per page. When I browse a category and choose to sort by price (lowest), it actually sorts the products, but when I change page (ex. page 2) the first product of page 2 has a price lower than the last product og page 1 (see screenshots). Any Idea on what may cause this problem? - I have force compile ON - I tried both with enabled/disabled cahce, that doesn't seem to solve the problem - Every product has a discount I also tried with a more complex catalog and it seems to paginate products in that wrong way when I choose the sort by price (ascending or descending). This is litterally driving me crazy.
  14. Check out if DNS Server (BIND) is running on your server (plesk -> tools & utilities -> services management): it's necessary only if you want to run a private nameserver (ex. ns1.yourdomain.com, ns2.yourdomain.com) and it actually wastes a LOT of memory
×
×
  • Create New...