Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Hide Url Of Vendors Without Store On The Product Page? Rate Topic   - - - - -

 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 67 posts

Posted 08 August 2019 - 11:15 AM #1

how can i hide url of vendors without store on the product page?

 

for example:

 

{if $vendor_store = 'Y'}

<a href="vendor url">vendor name</a>

{/if}



 
  • ilib
  • Advanced Member
  • Members
  • Join Date: 22-Mar 12
  • 91 posts

Posted 09 August 2019 - 01:56 PM #2

you need to create a custom addon or use an existing one.

 

In product controller add:

use Tygh\Models\Company;
....
....    

    $company = Company::model()->find($product['company_id']);
    if ($company->vendor_store) {
        Tygh::$app['view']->assign('vendor_store', true);
    }

then within file design/themes/responsive/templates/views/companies/components/product_company_data.tpl you need to override the hook: companies:product_company_data like this:

{if $vendor_store}
.........
{/if}

Hope this helps.

 

If however you have doubts do not hesitate to hire me to apply this mod


CS-Cart and Magento support and development

https://shop.kozeta.lt


 
  • Dexterflamez
  • Advanced Member
  • Trial users
  • Join Date: 08-Jan 18
  • 67 posts

Posted 10 August 2019 - 05:56 AM #3

you need to create a custom addon or use an existing one.

 

In product controller add:

use Tygh\Models\Company;
....
....    

    $company = Company::model()->find($product['company_id']);
    if ($company->vendor_store) {
        Tygh::$app['view']->assign('vendor_store', true);
    }

then within file design/themes/responsive/templates/views/companies/components/product_company_data.tpl you need to override the hook: companies:product_company_data like this:

{if $vendor_store}
.........
{/if}

Hope this helps.

 

If however you have doubts do not hesitate to hire me to apply this mod

 

Where exactly should i add this $company = Company::model()->find($product['company_id']);

    if ($company->vendor_store) {
        Tygh::$app['view']->assign('vendor_store', true);

    } ? i mean the file path, i tried adding to app/controllers/frontend/product.php but it broke the site