Jump to content

How to determine which variable to use in a module?


AnonymousUser

Recommended Posts

Hello, I'm kind of a PrestaShop noob and have a possibly obvious question.

 

I'm trying to update the buttons on our site to read "Out of stock" or "Unavailable for order" depending on several variables of the product. But buttons appear in various modules: related products, category pages, product pages, custom modules, etc.

 

In some modules you have to write out variables like "Allowing out of stock products" as $allow_oosp, while others have it as $product.allow_oosp, and some others don't use either.

 

Is there an easy way to determine which I should be writing out in a file, as opposed to guess-and-check?

Link to comment
Share on other sites

$product.allow_oosp

value of this variable you have to set up in back office, while you creating product (or while you editing it) - in this case you have to open "stock" tab, then you will be able to change the value of the messages related to the quantity

 

all other, you have to translate with localization > translation tool (modules translations)

Link to comment
Share on other sites

value of this variable you have to set up in back office, while you creating product (or while you editing it) - in this case you have to open "stock" tab, then you will be able to change the value of the messages related to the quantity

 

all other, you have to translate with localization > translation tool (modules translations)

 

The buttons are actually being added to a module that didn't originally have them, so translations won't be available, and I already have the buttons wording correct on the product pages.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...