Jump to content

skechav

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Location
    Greece
  • Activity
    Other

skechav's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. But with settings set to true and without using a new CMS page to keep your sizechart inside...check your page for a minute with Chrome browser...
  2. Kokosmin, while i was writting this post as I see that you finally corrected your javascript code. Your code didnt have width and height set before. Now I see it is working fine.
  3. Hello new_12, Nice try to implement your code..But If I didn't got it the wrong way you want a window that opens on a new browsers' tab which will contain an invoice inside..Why should you bother to open it on a new browsers tab really? I respect the fact that you want to implement it your way not matter what..but consider that (As Vekia said) popup windows and new tabs may be very annoying for people using mobile devices such as smart phones and tablets (especially those running with small screen resolutions and sizes.. In case I got it wrong (its too late and I m feeling sleepy) and you want to display a size chart on products page, I propose using a quite simple way to implement it. Finally, you will have a size chart button in a tabed row on products page which opens on a fancybox. If you want to achieve it first take a backup of your tpl file. Then follow Vekias steps on this site in order to have the tabs on your products page : http://mypresta.eu/en/art/prestashop-16/product-tabs.html Then create a new CMS page from your admins Backoffice which will contain your size charts.Format it as you like and when you finish it go to your products.tpl file again and find the code shown below, inside your products.tpl file <div id="more_info_block" class="clear"> <ul id="more_info_tabs" class="idTabs idTabsShort clearfix"> {if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if} {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if} and exactly after the last line and BEFORE the {$HOOK_PRODUCT_TAB} line paste the follow code : {if $product->id_category_default == '23' || $product->id_category_default == '15' || $product->id_category_default == '16'} {if $lang_iso=='de'} <li> <a href="{$base_dir}content/6-odigos-megethon?content_only=1&TB_iframe=true&width=700&height=470&thickbox=true" class="iframe"> Größe </a></li> {else $lang_iso=='en'}<li> <a href="{$base_dir}content/6-odigos-megethon?content_only=1&TB_iframe=true&width=700&height=470&thickbox=true" class="iframe">Size chart</a></li> {/if} {/if} you can remove the {if $product ->id_category_default == '23' || $pro...... {/if} routine line if you don't want to filter the buttons appearance based on the choosen category (23 or 15 or 16 etc ) Anyway, I hope this will help you or someone else in here I wish you good luck! PS : don't forget to change the content/6-odigos-megethon part above with the link to your cms sizechart page final result :
  4. Dear Nzecheru, I m happy that it helped somehow. I just would like to know if you finally really solved the problem this way by modified the header.tpl code as described and by pressing the "Skip validation" Button on googles' panel. Have a nice day
  5. The problem IS solved. I run two different sites of PS 1.6.8 and 1.6.9 this way and both of them get demographic details. Please, read the post carefully and do not rush.Also, it would be very helpful to add some extra details about the problem you face when saying that it doesn't work, so we could probably help you out. Good luck!
  6. Hello Matt, I found your topic searching for a good solution that i can control easily. I really appreciate your efforts and the time you spend to put things down and complete this task. I didnt test it yet but I ll try to find some time and check it on my testing enviroment. I also hope that some good programmers here will help you to debug and test it...Maybe I ll do as well when I ll be free. I ll let you know. THANKS a lot for sharing, Keep on the good work! Cheers !!!
  7. Hello RCP90, did you finally found a solution? As I see no responses I guess you did.I would like to know. Cheers
  8. Dear nzecheru, The problem with google code validation for Demographics is a well known problem and has been discussed enough on googles product forums. If you read some topics there, you will realize that since the correct code appears when you preview the source code output of your website with your browser, you can just press "Skip validation" button and it will work. You wiil get a "success" message form google on the next step. As with your code just move the ga('require', 'displayfeatures'); after the {else} and before the ga('send', 'pageview'); Everything else seems fine to me. If you are using P.S 1.6.8 like me it will work. Here is the code I use : {* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <script type="text/javascript"> {if $universal_analytics eq true} {literal} (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); {/literal} ga('create', '{$ganalytics_id|escape:'htmlall':'UTF-8'}'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}, 'auto'); {if $isOrder eq true} ga('require', 'ecommerce', 'ecommerce.js'); {else} ga('require', 'displayfeatures'); ga('send', 'pageview'); {/if} {if $isOrder eq true} ga('ecommerce:addTransaction', { 'id': '{$trans.id|escape:'htmlall':'UTF-8'}', 'affiliation': '{$trans.store|escape:'htmlall':'UTF-8'}', 'revenue': '{$trans.total|escape:'htmlall':'UTF-8'}', 'tax': '{$trans.tax|escape:'htmlall':'UTF-8'}', 'shipping': '{$trans.shipping|escape:'htmlall':'UTF-8'}', 'city': '{$trans.city|escape:'htmlall':'UTF-8'}', 'state': '{$trans.state|escape:'htmlall':'UTF-8'}', 'country': '{$trans.country|escape:'htmlall':'UTF-8'}', 'currency': '{$trans.currency|escape:'htmlall':'UTF-8'}' }); {foreach from=$items item=item} ga('ecommerce:addItem', { 'id': '{$item.OrderId|escape:'htmlall':'UTF-8'}', 'sku': '{$item.SKU|escape:'htmlall':'UTF-8'}', 'name': '{$item.Product|escape:'htmlall':'UTF-8'}', 'category': '{$item.Category|escape:'htmlall':'UTF-8'}', 'price': '{$item.Price|escape:'htmlall':'UTF-8'}', 'quantity': '{$item.Quantity|escape:'htmlall':'UTF-8'}' }); {/foreach} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} ga('ecommerce:send'); })(); {/literal} {/if} {else} var _gaq = _gaq || []; _gaq.push(['_setAccount', '{$ganalytics_id|escape:'htmlall':'UTF-8'}']); // Recommended value by Google doc and has to before the trackPageView _gaq.push(['_setSiteSpeedSampleRate', 5]); _gaq.push(['_trackPageview'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}]); {if $isOrder eq true} {* If it's an order we need more data for stats *} _gaq.push(['_addTrans', '{$trans.id|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$trans.store|escape:'htmlall':'UTF-8'}', {* affiliation or store name *} '{$trans.total|escape:'htmlall':'UTF-8'}', {* total - required *} '{$trans.tax|escape:'htmlall':'UTF-8'}', {* tax *} '{$trans.shipping|escape:'htmlall':'UTF-8'}', {* shipping *} '{$trans.city|escape:'htmlall':'UTF-8'}', {* city *} '{$trans.state|escape:'htmlall':'UTF-8'}', {* state or province *} '{$trans.country|escape:'htmlall':'UTF-8'}' {* country *} ]); {foreach from=$items item=item} _gaq.push(['_addItem', '{$item.OrderId|escape:'htmlall':'UTF-8'}', {* order ID - required *} '{$item.SKU|escape:'htmlall':'UTF-8'}', {* SKU/code - required *} '{$item.Product|escape:'htmlall':'UTF-8'}', {* product name *} '{$item.Category|escape:'htmlall':'UTF-8'}', {* category or variation *} '{$item.Price|escape:'htmlall':'UTF-8'}', {* unit price - required *} '{$item.Quantity|escape:'htmlall':'UTF-8'}' {* quantity - required *} ]); {/foreach} {* submits transaction to the Analytics servers *} {literal} _gaq.push(['_trackTrans']); {/literal} {/if} {literal} (function() { {/literal}{if $isOrder eq true}{literal} var key = 'ga_trans'; var idtrans = {/literal}{$trans.id|intval}{literal}; if (!!$.prototype.totalStorage) var view_ga_trans = parseInt($.totalStorage(key)); else if (typeof localStorage !== 'undefined' && localStorage) var view_ga_trans = parseInt(localStorage.getItem(key)); if (typeof view_ga_trans !== 'undefined' && view_ga_trans > 0 && idtrans == view_ga_trans ) return false; if (!!$.prototype.totalStorage) $.totalStorage(parseInt(key, idtrans)); else if (typeof localStorage !== 'undefined' && localStorage) localStorage.setItem(key, parseInt(idtrans)); {/literal}{/if}{literal} var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); {/literal} {/if} </script> Good luck, and feel free to come back if it won't work for you. (Details about validation problem here :https://productforums.google.com/forum/#!searchin/analytics/not$20validating|sort:relevance/analytics/_C2M4pZ9sEI/6r68GHifH5EJ)
  9. Hello everyone, RCP90, thanks for your notice. I am using ps 1.6.0.6 and I was planning to do the upgrade and use the directions given on this post but then I read your post, and I cannot find the $fields = $class::$definition['fields']; on line 3101 either... Though, I got to say that while writting this response I tried the update process using the 1-click upgrade module and it worked fine on my test site (which was also PS 1.6.0.6 version). I first updated ALL the modules that were marked with "Need update" and then I proceed to the update to 1.6.0.8 version. I hoped this helped someone.
×
×
  • Create New...