Hey guys,
I would like to change the product name in the 'Success: You have added" message to model instead.
Please can someone how me where this is stored. i have been searching for days now.
Default is 'Success: You have added 'product' to your cart
I would like : 'Success: You have added 'model' to your cart.
Any guidance please.
OC 3.0.3.2
I would like to change the product name in the 'Success: You have added" message to model instead.
Please can someone how me where this is stored. i have been searching for days now.
Default is 'Success: You have added 'product' to your cart
I would like : 'Success: You have added 'model' to your cart.
Any guidance please.
OC 3.0.3.2
Last edited by driveshafts on Mon Mar 21, 2022 4:34 pm, edited 1 time in total.
Hi driveshafts,
That requires just a minor modification in catalog/controller/checkout/cart.
Change
to
(Change $product_info['name'] to $product_info['model'])
This can be done in an OCMOD with:
Please find attached an installer that does exactly that.
Hope this helps,
Gergely
That requires just a minor modification in catalog/controller/checkout/cart.
Change
Code: Select all
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));
Code: Select all
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['model'], $this->url->link('checkout/cart'));
This can be done in an OCMOD with:
Code: Select all
<file path="catalog/controller/checkout/cart.php">
<operation error="skip">
<search regex="true"><![CDATA[
~(\$json\['success'\].*\$product_info\[)'name'(\].*;)~
]]></search>
<add><![CDATA[
$1'model'$2
]]></add>
</operation>
</file>
Hope this helps,
Gergely
Just wow!!
Gergely you are amazing, that worked perfectly. I really do appreciate it. Can i pay you for this?
Gergely you are amazing, that worked perfectly. I really do appreciate it. Can i pay you for this?
If this is now fixed, please add [SOLVED] to the start of this post title.driveshafts wrote: ↑Fri Mar 18, 2022 6:26 pmJust wow!!
Gergely you are amazing, that worked perfectly. I really do appreciate it. Can i pay you for this?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Helping with minor tweaks like that is just my way of giving back to the community, so your expressed appreciation is more than enough for the effort I've put into this. Glad to have been of assistance!
driveshafts wrote: ↑Fri Mar 18, 2022 6:26 pmJust wow!!
Gergely you are amazing, that worked perfectly. I really do appreciate it. Can i pay you for this?
Thanks Gergely
OC version postedHey guys,
I would like to change the product name in the 'Success: You have added" message to model instead.
Please can someone how me where this is stored. i have been searching for days now.
Default is 'Success: You have added 'product' to your cart]
I would like : 'Success: You have added 'model' to your cart.
Any guidance please.
OC 3.0.3.2
OC default
Clear description of what is required
and the please helps .. the thank you helps also
Well done driveshafts I am glad you have this sorted
If you could just follow what Paul wrote earlier that would be perfect - it is customary to edit the title as solved so as anyone searching google in future will find this post and will know there is a solution
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Running OC3.03.2
Would like to remove the success you have added xxx pop up completely (the one that pops up if you add to cart from the category menu for example) - is it just a case of removing the following from cart.php
if (isset($this->session->data['success'])) {
$data['success'] = $this->session->data['success'];
unset($this->session->data['success']);
} else {
- or
1) Am I looking in the wrong place - if so, where do I find the file(s)!
2) Do I need to change more files - if so can you confirm details please!
Would like to remove the success you have added xxx pop up completely (the one that pops up if you add to cart from the category menu for example) - is it just a case of removing the following from cart.php
if (isset($this->session->data['success'])) {
$data['success'] = $this->session->data['success'];
unset($this->session->data['success']);
} else {
- or
1) Am I looking in the wrong place - if so, where do I find the file(s)!
2) Do I need to change more files - if so can you confirm details please!
Who is online
Users browsing this forum: Majestic-12 [Bot] and 213 guests