Where And How To Edit Featured Vendors Template On Homepage

Hello,

I am used ViVashop theme and already have edited some files where it shows a vendors location as "city, country" style. what I needed is "city, state".

for example vendor's store header part and companies.catalog page shows vendor's location as "city, country" and I could find templates for those area and changed it.

but when it comes to homepage vendors, even I am trying to edit that part, but it doesn't have it. it's just prints out {$smarty.capture.$location nofilter} which already city and country combined. I have checked everywhere and I couldn't find the codes that combine them, not php or smarty template files.

currently for example Simtech is shown as Los-Angeles, US and I want to make it as Los-Angeles, CA.

I have checked all php codes, there is not any assign for {$smarty.capture.$location nofilter} but on template file prints as {$smarty.capture.$location nofilter} and it already format as city, country. I want to change it as city, state.

Please help if anyone knows it, thanks in advance.

Currently I have tried to use this code;

{$company.city}, {$company.state}
and it works as I wanted. however, I would love to learn where and how that $location combined by itself..

I think, you are writing about the following template

design/themes/responsive/templates/common/company_data.tpl

It can be also located in the vivashop directory

I think, you are writing about the following template

design/themes/responsive/templates/common/company_data.tpl

It can be also located in the vivashop directory

Thanks EcomLabs, as always, you are amazing.

dear @EcomLabs,

I have 1 question. I hope you answer this.

on the layout editor, homepage, there is 1 block that I would like to show with certain condition. is that possible? if so, where I should start digging?

for example, vivashop uses a main marketplace menu on vendor's content (dispatch=companies.*) and I would like to change that and make it available depend on vendor_plan. for example FREE vendors shouldn't have it or so. this is just example, this could be any blocks on homepage or any other page.

Please advise EcomLabs, I would like to know it.

Thanks in advance EcomLabs.

Yes, you can create new wrapper for block with necessary conditions

Wrappers are located here

design/themes/responsive/templates/blocks/wrappers

Just copy one of the wrappers and clear cache. It should be automatically added to the list of wrappers in the admin panel

Then just correct the template and add necessary conditiions

Yes, you can create new wrapper for block with necessary conditions

Wrappers are located here

design/themes/responsive/templates/blocks/wrappers

Just copy one of the wrappers and clear cache. It should be automatically added to the list of wrappers in the admin panel

Then just correct the template and add necessary conditiions

Thank you very much @eComLabs, you are amazing. I would like to ask you 1 more question and buy for you a box beer, I would need your paypal.

EcomLabs,

how can we achieve this;

let say currently we have layout for dispatch=companies.products and I want to have different layout for the same dispatch depending on vendor plan. let say GOLD plan has to have a new look, different elements than FREE plan.

I remember your 1 addon can assign different seo name with different parameter for the same dispatch. also another 1 addon have different location options or so.

I want to have different layout for dispatch=companies.products depending on vendor plan. where I should start digging?

Please let me know.

Thanks in advance eComLabs.

I want to have different layout for dispatch=companies.products depending on vendor plan. where I should start digging?

Do you mean completely different set of blocks? Or you just want to change the view of the main content?

Do you mean completely different set of blocks? Or you just want to change the view of the main content?

completely different set of blocks I would say. but they are uses same dispatch, maybe some same blocks I can use on both layout. but on the new one should have different view, blocks, more advanced than the old one. that is what I was thinking.

with above wrapper method, I could on/off some blocks depend on vendor plan. what I am thinking is, completely different layout. is that possible?

but again, depend on vendor plan.

completely different set of blocks I would say. but they are uses same dispatch, maybe some same blocks I can use on both layout. but on the new one should have different view, blocks, more advanced than the old one. that is what I was thinking.

with above wrapper method, I could on/off some blocks depend on vendor plan. what I am thinking is, completely different layout. is that possible?

but again, depend on vendor plan.

Separate layout for each plan is quite complex modification. But you can partially solve the issue with different wrappers for different plans

Separate layout for each plan is quite complex modification. But you can partially solve the issue with different wrappers for different plans

I understand that. can you answer this question then?

I understand that the blocks can be on/off with wrappers. but when I have tried to use my own GRID WRAPPERS, not anyway it works.

for example even I find out that VIVASHOP theme has it's own problem on this.

if you see this folder, you will see 5 files/wrappers. when on admin panel, you will only 4 grid wrappers.

design\themes\vivashop\templates\blocks\grid_wrappers

I have checked everywhere and couldn't find out why.

think like this;

layout edit page, you want to hide some grid (not blocks), and you will need to write your own grid wrappers. you put it in correct folders, clear cache, but you can't see on admin panel.

but the same thing for blocks works fine as you redirected above.

how to use our own grid wrappers? have you ever faced or realized this types of problems?

I know cs-cart has 4 default grid, top menu, header, body, footer. vivashop uses on vendors pages some extra grids. I would love to know this.

For some reason grid wrappers use another logic. You should extend the following schema

app/schemas/block_manager/grids.php

For some reason grid wrappers use another logic. You should extend the following schema

app/schemas/block_manager/grids.php

eComLabs, you are always amazing! you have extremely high knowledge on cs-cart! it's really good to have you on this forums, really good.

Please let me to buy for you a beer, what's you paypal eComLabs?

Thanks eComLabs!

By this way, I have tested to extend the schema and specially the grids.php reads only from \app\schemas\block_manager and you can't extend it from addons\my_changes\schema\block_manager. even from \app\schemas\block_manager accepts only it's own grids.php one file and we have only one solution, to extend the lite_checkout array on the file.

this is really a good lesson for theme developers, including vivashop and others.

Please let me to buy for you a beer, what's you paypal eComLabs?

This is not necessary, thank you

By this way, I have tested to extend the schema and specially the grids.php reads only from \app\schemas\block_manager and you can't extend it from addons\my_changes\schema\block_manager. even from \app\schemas\block_manager accepts only it's own grids.php one file and we have only one solution, to extend the lite_checkout array on the file.

this is really a good lesson for theme developers, including vivashop and others.

Try the following

app/addons/my_changes/schemas/block_manager/grids.post.php

$schema[‘wrappers’][__(‘my_template_name’)] = ‘path/to/my_template.tpl’;

return $schema;

(!) Not tested

This is not necessary, thank you

Try the following

app/addons/my_changes/schemas/block_manager/grids.post.php

$schema[‘wrappers’][__(‘my_template_name’)] = ‘path/to/my_template.tpl’;

return $schema;

(!) Not tested

I have tested, and like I said above, this is not working, overrides the grids.php file's content. but only way to work on this is, to extend the array in grids.php file. like you said above, this has different logic.

It works for me (through grids.post.php)

https://prnt.sc/bUfZCIhySedJ

Do not forget to clear cache after the changes are applied

It works for me (through grids.post.php)

https://prnt.sc/bUfZCIhySedJ

Do not forget to clear cache after the changes are applied

this one, cs-cart style is NOT working;

$schema = [
    'wrappers' => [
        __('ozemning44') => 'blocks/grid_wrappers/ozemning_grid_wrappers44.tpl',
    ],
];

bu this one, your style code is working;

$schema['wrappers'][__('my_template_name')] = 'blocks/grid_wrappers/ozemning_grid_wrappers44.tpl';
return $schema;

I don't know why, but there is really something wrong. Thanks eComLabs, it's really really good to have you on this forums.

You are welcome!