Jump to content

Louis7777

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • First Name
    Louis
  • Last Name
    Webmaster

Recent Profile Visitors

195 profile views

Louis7777's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. I have the exact same problem... /login?back=my-account redirects to /my-account and again back to /login?back=my-account and loops... Have you solved this by now?
  2. I now have the latest version, v1.7.2.0. Upgrading is a pain every time because all of the modules that I had disabled are re-enabled after the upgrade is completed! Moreover, I've lost settings in some modules e.g. in "Featured products" the "Number of products to be displayed" went back to its default value. I can't possibly keep track of all my module settings and their statuses - it's a pain! Any known way to avoid these problems?
  3. I have version 1.7.1.1 I have a child theme: parent: classic name: mychildtheme display_name: A Child Theme version: 1.0.0 author: name: "Myself" assets: # If you're using this theme as child and you want to load # the parent theme assets, uncomment this line. use_parent_assets: true # The following lines are showing how to load assets in your page # Uncomment and change value to start loading css or js files css: all: - id: custom-lib-style path: assets/css/custom.css The child's custom.css won't load by default as it should, but instead I get the parent's one!!! And if I register custom.css in theme.yml then I get the parent's file twice!!! For example: <link rel="stylesheet" href="http://domain.com/shop/themes/classic/assets/css/theme.css" type="text/css" media="all"> [...] <link rel="stylesheet" href="http://domain.com/shop/themes/classic/assets/css/theme.css" type="text/css" media="all"> How can I load my childs assets??? I can't find documentation about this anywhere and it is frustrating!!!
  4. Ας πούμε ότι θέλω σε ένα child theme που έφτιαξα να παρακάμψω το header template του classic theme, οπότε φτιάχνω ένα νέο template για το child theme: themes/mychildtheme/templates/_partials/header.tpl Θέλω φυσικά εκτός από την εμφάνιση να αλλάξω και τα κείμενα και να βάλω τις δικές μου εκφράσεις και γλωσσικές μεταβλητές, οπότε του "πετάω" λίγη σύνταξη σε Smarty κάπως έτσι: {l s='Header Information' d='Shop.Mytheme'} Και έτσι μόλις δημιούργησα ένα νέο language expression και μπορώ να πάω στο backoffice στο International > Translations > Themes translations [modify] , και να γράψω "Header Information" ή απλά "Header", να το συμπληρώσω για τη γλώσσα που θέλω και να το σώσω. Είναι όμως αυτός ο σωστός και ενδεδειγμένος τρόπος; Και πώς μπορώ να σώσω τις γλώσσες μέσα στο φάκελο του child theme ώστε να μπορώ να τις μεταφέρω μαζί του και να έχω έτσι ένα fully portable theme; Βλέπω ότι έχει δημιουργηθεί και υπάρχει ένας φάκελος "translations" μέσα στο child theme με υποφακέλους για την κάθε γλώσσα που χρησιμοποιώ αλλά είναι πάντα άδειοι!
  5. Thank you for the {debug} tip. I can't believe that there's no one who can easily answer all that basic stuff!!! I believe that the answers to all of my questions should be smaller than my post. How time consuming would it be for the devs to update the documentation with at least the basic stuff? PrestaShop is one of the few top choices for making e-shops. It is such a shame that I feel so lost when trying to create with it!
  6. Bump. I would be grateful for some help. I can't find any good documentation!
  7. Bump. I would be grateful for some help. I can't find any good documentation!
  8. Yes, class="blockcart" and data-refresh-url="{$refresh_url}" is all that needs to be there. Now try to add, for example, {$currency.sign} somewhere in that file and then try to empty your cart. It won't refresh.
  9. I've created a child theme of "classic" and I've been trying to figure out a lot of things. I would like your thoughts, corrections and your step by step how-to. 1) Configuring CSS for the child theme in theme.yml parent: classic name: mychildtheme display_name: My Child Theme version: 1.0.0 assets: # If you're using this theme as child and you want to load # the parent theme assets, uncomment this line. use_parent_assets: true # The following lines are showing how to load assets in your page # Uncomment and change value to start loading css or js files css: all: - id: custom-lib-style path: assets/css/custom-lib.css As you can see above, I want the child to use all of the parent's CSS and to additionally load a custom-lib.css file. Am I doing it right? I guess not, because I had no luck loading the custom-lib.css file. So, in the end, I used the standard custom.css file for everything. HOWEVER, I upgraded 1.7.0.6 to 1.7.1 today, and the custom.css of the child won't load either!!! What loads instead is the parent's custom.css. Why is that? How do I override the parent's CSS while still keeping the "use_parent_assets: true"??? 2) Adding language expressions to overridden template files Let's say that I want to override the classic site header and so I recreate it in the child theme like this: themes/mychildtheme/templates/_partials/header.tpl I am overriding a template so I'll want to add my own multilingual text too, and so I throw in some smarty stuff like this: {l s='Header Information' d='Shop.Mytheme'} And so I've just created a new language expression and then I can go @ the backoffice to International > Translations > Themes translations [modify] , then type "Header Information" or just "Header", fill in the appropriate language field and save it. Is this the correct way of doing things? And how can I save the languages in the child theme's directory so that it will be a fully portable theme? I can see a "translations" folder with language sub-directories but they are always empty! 3) Smarty template variables usage and documentation [v1.7.*] 3a. Finding out what is available to use? First of all, I was unable to find any up-to-date article on available global template variables and how to use them. I kept stumbling upon old information such as this: https://www.prestashop.com/forums/topic/57122-global-smarty-variables-used-in-prestashop/ None of those work. For example, {$shop_name} won't do anything because {$shop.name} is the correct one. The variable {$base_dir} won't do anything at all, but {$urls.base_url} will. So I had to find them out myself by looking at how things are done in the classic theme templates. I saw there instances of $shop, $urls, $currency, $cart and others. Some are global, some only work in specific module templates. I am aware that there is some inline JavaScript in the theme's <head> that contains relevant information, but it's not that much helpful. I had to @var_dump them to find out what each one has to offer. Like this: <pre>{$node|@var_dump}</pre> <pre>{$shop|@var_dump}</pre> <pre>{$urls|@var_dump}</pre> <pre>{$page|@var_dump}</pre> <pre>{$language|@var_dump}</pre> <pre>{$current_language|@var_dump}</pre> <pre>{$cart|@var_dump}</pre> <pre>{$product|@var_dump}</pre> <pre>{$currency|@var_dump}</pre> Is there any proper documentation that would save me from all this trouble? Keep in mind that I only want to mess with themes. I want to work only in the "themes" folder i.e. no PHP recipes, controllers etc. In other words, only template files with smarty syntax and HTML, CSS, JavaScript, and YAML. 3b. How to import local variables in other templates? For example, variables like {$cart.products_count} and {$cart.totals.total.value} can only appear in modules/ps_shoppingcart/ps_shoppingcart.tpl. Is there any way to use them elsewhere? 3c. Global variables seem to cause malfunctions inside certain modules? I will present a couple of examples below. I'm overriding modules/ps_shoppingcart/ps_shoppingcart.tpl in the child theme. Let's say that I place anywhere in the file the variable {$currency.sign}. Boom. Emptying the cart no longer updates the cart and a page refresh is required!? Now let's get more weird. Let's say that I place anywhere in the file a variable that prints the URL of the order page. Be it a smarty variable, be it a JavaScript document.write()... try whatever you want to print the URL of the order page and... boom... the cart modal doesn't show up whenever you try to buy a product. So what's up? Where can I educate myself about these issues?
  10. I've created a child theme of "classic" and I've been trying to figure out a lot of things. I would like your thoughts, corrections and your step by step how-to. 1) Configuring CSS for the child theme in theme.yml parent: classic name: mychildtheme display_name: My Child Theme version: 1.0.0 assets: # If you're using this theme as child and you want to load # the parent theme assets, uncomment this line. use_parent_assets: true # The following lines are showing how to load assets in your page # Uncomment and change value to start loading css or js files css: all: - id: custom-lib-style path: assets/css/custom-lib.css As you can see above, I want the child to use all of the parent's CSS and to additionally load a custom-lib.css file. Am I doing it right? I guess not, because I had no luck loading the custom-lib.css file. So, in the end, I used the standard custom.css file for everything. HOWEVER, I upgraded 1.7.0.6 to 1.7.1 today, and the custom.css of the child won't load either!!! What loads instead is the parent's custom.css. Why is that? How do I override the parent's CSS while still keeping the "use_parent_assets: true"??? 2) Adding language expressions to overridden template files Let's say that I want to override the classic site header and so I recreate it in the child theme like this: themes/mychildtheme/templates/_partials/header.tpl I am overriding a template so I'll want to add my own multilingual text too, and so I throw in some smarty stuff like this: {l s='Header Information' d='Shop.Mytheme'} And so I've just created a new language expression and then I can go @ the backoffice to International > Translations > Themes translations [modify] , then type "Header Information" or just "Header", fill in the appropriate language field and save it. Is this the correct way of doing things? And how can I save the languages in the child theme's directory so that it will be a fully portable theme? I can see a "translations" folder with language sub-directories but they are always empty! 3) Smarty template variables usage and documentation [v1.7.*] 3a. Finding out what is available to use? First of all, I was unable to find any up-to-date article on available global template variables and how to use them. I kept stumbling upon old information such as this: https://www.prestashop.com/forums/topic/57122-global-smarty-variables-used-in-prestashop/ None of those work. For example, {$shop_name} won't do anything because {$shop.name} is the correct one. The variable {$base_dir} won't do anything at all, but {$urls.base_url} will. So I had to find them out myself by looking at how things are done in the classic theme templates. I saw there instances of $shop, $urls, $currency, $cart and others. Some are global, some only work in specific module templates. I am aware that there is some inline JavaScript in the theme's <head> that contains relevant information, but it's not that much helpful. I had to @var_dump them to find out what each one has to offer. Like this: <pre>{$node|@var_dump}</pre> <pre>{$shop|@var_dump}</pre> <pre>{$urls|@var_dump}</pre> <pre>{$page|@var_dump}</pre> <pre>{$language|@var_dump}</pre> <pre>{$current_language|@var_dump}</pre> <pre>{$cart|@var_dump}</pre> <pre>{$product|@var_dump}</pre> <pre>{$currency|@var_dump}</pre> Is there any proper documentation that would save me from all this trouble? Keep in mind that I only want to mess with themes. I want to work only in the "themes" folder i.e. no PHP recipes, controllers etc. In other words, only template files with smarty syntax and HTML, CSS, JavaScript, and YAML. 3b. How to import local variables in other templates? For example, variables like {$cart.products_count} and {$cart.totals.total.value} can only appear in modules/ps_shoppingcart/ps_shoppingcart.tpl. Is there any way to use them elsewhere? 3c. Global variables seem to cause malfunctions inside certain modules? I will present a couple of examples below. I'm overriding modules/ps_shoppingcart/ps_shoppingcart.tpl in the child theme. Let's say that I place anywhere in the file the variable {$currency.sign}. Boom. Emptying the cart no longer updates the cart and a page refresh is required!? Now let's get more weird. Let's say that I place anywhere in the file a variable that prints the URL of the order page. Be it a smarty variable, be it a JavaScript document.write()... try whatever you want to print the URL of the order page and... boom... the cart modal doesn't show up whenever you try to buy a product. So what's up? Where can I educate myself about these issues?
×
×
  • Create New...

Important Information

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