Jump to content

 

madanps

Member Since 23 Jun 2021
Offline Last Active Jul 21 2021 04:35 PM
-----

Posts I've Made

In Topic: Theme Modifications

20 July 2021 - 03:25 PM

You should use either the my_changes addon or create a new one.

If there are no hooks in the theme file from Vivashop, you can either:

  1 - ask them to add the hook so it will appear in future releases of theirs

  2 - Use an override.  Copy the file to the override location in your addon and edit away

i needed only to customize a selected div and not the whole file.
is it possible if there is no hooks attatched?


In Topic: Theme Modifications

16 July 2021 - 03:07 PM

I am not allowed to modify the existing theme, so I am trying to make changes by creating a custom addon


In Topic: Theme Modifications

16 July 2021 - 03:03 PM

If you mean redirect from the vendor page, you can catch this request in the companies.pre.php controller in your addon

I tried to catch request from

companies.view?company_id=`$company_id`

 

in companies.pre.php, at mode=view.

 

-> but, everytime, the link redirects to "companies.products", and I have to match it's SEO name to match and open vendor link.

 

->  another problem i am facing is, i can't figure out a way to open the link in new tab.

 

currently, my code is as:

 

$company_id = (int) $_REQUEST['company_id'];

$company_data = !empty($company_id) ? fn_get_company_data($company_id) : [];

header("HTTP/1.1 301 Moved Permanently");

header("Location: " . $company_data['url']);

exit();

 

can you help me to oepn the url in new tab please.


In Topic: Theme Modifications

05 July 2021 - 02:17 PM

If you mean redirect from the vendor page, you can catch this request in the companies.pre.php controller in your addon

From vendor page is just an example. In fact, I have multiple places from where, I have to redirect to external domain for every vendors. I needed a better understanding of how to apply modifications in themes, because after theme upgrades, my custom changes would be lost.

Can you please share about how can I make modifications such that the changes would remain even after theme upgrade.


From vendor page is just an example. In fact, I have multiple places from where, I have to redirect to external domain for every vendors. I needed a better understanding of how to apply modifications in themes, because after theme upgrades, my custom changes would be lost.

Can you please share about how can I make modifications such that the changes would remain even after theme upgrade.

To be specific, I am working on vivashop theme.


In Topic: Theme Modifications

05 July 2021 - 06:50 AM

I want to follow the approach of creating a separate addon and don't modify the files that exists in the theme, and no matter for upgrades, my changes will reflect, but this way, I can't seem to find a way, how to do it.
Please suggest me