Jump to content

dianacd

New Members
  • Posts

    9
  • Joined

  • Last visited

About dianacd

  • Birthday 10/03/1993

Profile Information

  • First Name
    Diana
  • Last Name
    Acevedo
  • Activity
    Developer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

dianacd's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. You can access from .tpl using {$modules.mcr_global_var.your_variable} To use my code you can download the only the mcr_global_var.php file and compress it into a folder and install it as a module from the BO, or just add it manually to your modules folder, then you can update the files from the modules folder with your variables anytime.
  2. Finally I created a module to set my global variables. They are accesible only from TPL files though. Here is the code in case that it may be useful for anyone: https://github.com/dianacd/prestashop_modules/tree/master/mcr_global_var
  3. I was wondering, is there a way to use this variables from tpl created in Ap ShortCode? I tried but they are not recognized!
  4. Thanks for your advice! I did it in the fast way, I override the FrontController and it works as expected
  5. Thanks a mill! I will try it and post the outcome!
  6. Hello!! I want to create some custom global constants that I can access from all TPL, this is some information like specific emails or external URLs that I want to put across the webpage, and in case that they change I just need to update the global constant and not all the TPLs that contain the information. Is there a way to create a custom global constant?
  7. Thank you for your idea!! I will try this and post the outcome
  8. Hello there, I am new developer in Prestashop, I use Prestashop 1.7 I added a sold out flag when product quantity is 0 with the following code: {if $product.quantity==0} <li> <img src="soldout.png" style="position:absolute;max-width:65px" /> </li> {/if} But when the customer adds the product to the cart (if the only quantity available is 1) the sold out label will be shown in the product list. I would like to instead, show a flag that says "Already in cart" in this case but I am not sure how to verify if the current product is on cart. Someone has any idea in how to do the condition to verify current product is in cart? Thanks!
  9. Hello there, I am new developer in Prestashop, I use Prestashop 1.7 I added a sold out flag when product quantity is 0 with the following code: {if $product.quantity==0} <li> <img src="soldout.png" style="position:absolute;max-width:65px" /> </li> {/if} But when the customer adds the product to the cart (if the only quantity available is 1) the sold out label will be shown in the product list. I would like to instead, show a flag that says "Already in cart" in this case but I am not sure how to verify if the current product is on cart. Someone has any idea in how to do the condition to verify current product is in cart? Thanks!
×
×
  • Create New...

Important Information

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