Jump to content

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

How To Hook Into Vendor Page Rate Topic   - - - - -

 
  • boy
  • Member
  • Trial users
  • Join Date: 19-Oct 18
  • 20 posts

Posted 16 February 2019 - 01:43 PM #1

Hi,

 

i am writing a plugin that hooks into the vendor page.

 

My first question is: which template is responsible for the Vendor Page? If my store adress was cs-cart.com, then each "vendor x" has a page at cs-cart.com/vendor-x, cs-cart.com/vendor-y. Which template is this? If I click "more" on this page, I am redirected to dispatch companies.view of the company ID.

 

Second question: on dispatch=companies.view, there are some tabs that say "description", "reviews". I want to add more tabs there. However, I dont understand how the common/tabsbox.tpl determines which tabs are displayed. Is it not possible to use the companies:tabs hook to add more tabs?

 

Thanks!



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 461 posts

Posted 16 February 2019 - 02:50 PM #2

Try this free addon

https://forum.cs-car...or-multivendor/



 
  • boy
  • Member
  • Trial users
  • Join Date: 19-Oct 18
  • 20 posts

Posted 16 February 2019 - 03:38 PM #3

This plugin is not bad, but unfortunately it uses the Website Tab which I have disabled for my Vendors.

 

Still very helpful. Thanks very much!



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11642 posts

Posted 16 February 2019 - 07:26 PM #4

What menu area it uses is probably defined in it's [ADDON]/schemas/menu/menu.post.php file and should be able to be easily changed.

 

Most likely the template you're interested in is:design/themes/responsive/templates/views/companies/view.tpl

You would use thehook 'companies:tabs' to add additional tabs to the page.

A vendor's products are shown using the products.tpl template in the same directory.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 01 July 2020 - 10:25 AM #5

Hello,

 

Have you managed to add a tab? I'm trying to do the same thing and I managed to use the hook, but whatever I do, it seems it doesn't add another tab.

 

Wrote something like this:

 

<div id="content_social"
                 class="{if $selected_section && $selected_section != "social"}hidden{/if}">
                 <h2>Works</h2>
            </div>

 

Do I need to do something else? Maybe related to $selected_section?



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11642 posts

Posted 01 July 2020 - 05:27 PM #6

You will have to extend the $navigation_tabs template variable to include the the new name of your tab (I.e. content_social).

You can search for $navigation_tabs in the app/controllers/frontend directory to see what controller/modes you need to add a 'post' controller for.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 

Posted 03 July 2020 - 10:37 AM #7

It worked. Thank you  :-)