How to Override Magento 2 vendor files
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
How to override addtocart.phtml files to change "Add to cart" button name.
magento2
add a comment |
How to override addtocart.phtml files to change "Add to cart" button name.
magento2
add a comment |
How to override addtocart.phtml files to change "Add to cart" button name.
magento2
How to override addtocart.phtml files to change "Add to cart" button name.
magento2
magento2
edited 15 hours ago
Amit Bera♦
59.8k1676178
59.8k1676178
asked 15 hours ago
Shweta KhattarShweta Khattar
284
284
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
You can use theme translation at here.
Create {LanguageCode}.csv at
__/app
|__/design
|__/frontend
|__/<Vendor>
|__/<theme>
|__/i18n
|-- {LanguageCode}.csv
At this csv, "Add to Cart","MYCart".
See more detail at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
After that, you need to run static content deploy for getting affect of the translation.
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
add a comment |
You need to overwrite addtocart.phtml file with in your theme directory.
Copy the addtocart.phtml file from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
to
app/design/frontend/<vendor-name>/<theme-name>/Magento_catalog/templates/product/view/addtocart.phtml
and make edit as you wants on this phtml file.
Flush the cache and refresh the page. I hope this helps.
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
add a comment |
Try overide with you theme file
Copy the file from below path
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
then paste it in below path
app/design/frontend/{Package}/{theme-name}/Magento_Catalog/templates/product/view/addtocart.phtml
clean cache and check.
EDIT :
In order to change label see @Amit answer, that would be simple.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269501%2fhow-to-override-magento-2-vendor-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use theme translation at here.
Create {LanguageCode}.csv at
__/app
|__/design
|__/frontend
|__/<Vendor>
|__/<theme>
|__/i18n
|-- {LanguageCode}.csv
At this csv, "Add to Cart","MYCart".
See more detail at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
After that, you need to run static content deploy for getting affect of the translation.
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
add a comment |
You can use theme translation at here.
Create {LanguageCode}.csv at
__/app
|__/design
|__/frontend
|__/<Vendor>
|__/<theme>
|__/i18n
|-- {LanguageCode}.csv
At this csv, "Add to Cart","MYCart".
See more detail at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
After that, you need to run static content deploy for getting affect of the translation.
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
add a comment |
You can use theme translation at here.
Create {LanguageCode}.csv at
__/app
|__/design
|__/frontend
|__/<Vendor>
|__/<theme>
|__/i18n
|-- {LanguageCode}.csv
At this csv, "Add to Cart","MYCart".
See more detail at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
After that, you need to run static content deploy for getting affect of the translation.
You can use theme translation at here.
Create {LanguageCode}.csv at
__/app
|__/design
|__/frontend
|__/<Vendor>
|__/<theme>
|__/i18n
|-- {LanguageCode}.csv
At this csv, "Add to Cart","MYCart".
See more detail at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/xlate.html
After that, you need to run static content deploy for getting affect of the translation.
edited 7 hours ago
answered 15 hours ago
Amit Bera♦Amit Bera
59.8k1676178
59.8k1676178
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
add a comment |
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
That a good criteria to update just title all over the website. +1
– Muhammad Anas
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
Great answer and Better criteria to update through translation dictionaries. +1
– Muhammad Hasham
15 hours ago
add a comment |
You need to overwrite addtocart.phtml file with in your theme directory.
Copy the addtocart.phtml file from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
to
app/design/frontend/<vendor-name>/<theme-name>/Magento_catalog/templates/product/view/addtocart.phtml
and make edit as you wants on this phtml file.
Flush the cache and refresh the page. I hope this helps.
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
add a comment |
You need to overwrite addtocart.phtml file with in your theme directory.
Copy the addtocart.phtml file from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
to
app/design/frontend/<vendor-name>/<theme-name>/Magento_catalog/templates/product/view/addtocart.phtml
and make edit as you wants on this phtml file.
Flush the cache and refresh the page. I hope this helps.
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
add a comment |
You need to overwrite addtocart.phtml file with in your theme directory.
Copy the addtocart.phtml file from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
to
app/design/frontend/<vendor-name>/<theme-name>/Magento_catalog/templates/product/view/addtocart.phtml
and make edit as you wants on this phtml file.
Flush the cache and refresh the page. I hope this helps.
You need to overwrite addtocart.phtml file with in your theme directory.
Copy the addtocart.phtml file from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
to
app/design/frontend/<vendor-name>/<theme-name>/Magento_catalog/templates/product/view/addtocart.phtml
and make edit as you wants on this phtml file.
Flush the cache and refresh the page. I hope this helps.
answered 15 hours ago
Kamlesh YaduwanshiKamlesh Yaduwanshi
213
213
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
add a comment |
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
app/design/frontend/magento then no any folder here.
– Shweta Khattar
15 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
It seems you have not created a custom theme yet. for the best practice you need to create a custom theme and apply it. Please following the official guide for it: devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/… and devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/…
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
Also I agree with @Amit answer, that would be simple in order to change just label.
– Kamlesh Yaduwanshi
14 hours ago
add a comment |
Try overide with you theme file
Copy the file from below path
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
then paste it in below path
app/design/frontend/{Package}/{theme-name}/Magento_Catalog/templates/product/view/addtocart.phtml
clean cache and check.
EDIT :
In order to change label see @Amit answer, that would be simple.
add a comment |
Try overide with you theme file
Copy the file from below path
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
then paste it in below path
app/design/frontend/{Package}/{theme-name}/Magento_Catalog/templates/product/view/addtocart.phtml
clean cache and check.
EDIT :
In order to change label see @Amit answer, that would be simple.
add a comment |
Try overide with you theme file
Copy the file from below path
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
then paste it in below path
app/design/frontend/{Package}/{theme-name}/Magento_Catalog/templates/product/view/addtocart.phtml
clean cache and check.
EDIT :
In order to change label see @Amit answer, that would be simple.
Try overide with you theme file
Copy the file from below path
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
then paste it in below path
app/design/frontend/{Package}/{theme-name}/Magento_Catalog/templates/product/view/addtocart.phtml
clean cache and check.
EDIT :
In order to change label see @Amit answer, that would be simple.
edited 15 hours ago
answered 15 hours ago
Prathap GunasekaranPrathap Gunasekaran
1,7831618
1,7831618
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f269501%2fhow-to-override-magento-2-vendor-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown