Jump to content

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

Print Company Data To Page Rate Topic   - - - - -

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3157 posts

Posted 22 June 2018 - 09:11 AM #1

I want to create a returns, privacy policy pages that can be shared among ultimate store fronts. Problem is I have to mention in text apart from company name also url.

 

So can I have somehow url be printed among text?

 

For example privacy-policy

 

 

At {domain}, your privacy is our priority.

 

?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17613 posts

Posted 22 June 2018 - 01:01 PM #2

Use square brackets to exclude problems with SMARTY

 

For example, in design/themes/THEME/templates/views/pages/view.tpl

 

replace

{$page.description nofilter}

with

{$cname = $runtime.company_id|fn_get_company_name}
{$page.description|replace:'[domain]':$cname nofilter}

It can be also made with hooks, if you are familiar with them


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3157 posts

Posted 22 June 2018 - 01:12 PM #3

Will above print company name or its url ?

 

I would want

 

/admin.php?dispatch=companies.update&company_id=1

 

Company website field to be printed, domain name you are on now



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17613 posts

Posted 22 June 2018 - 01:28 PM #4

If I understand you correctly, you can use

{$cdata = $runtime.company_id|fn_get_company_data}
{capture name="cdata"}
    <a href="{$cdata.storefront}" target="_blank">{$cdata.company}</a>
{/capture}
{$page.description|replace:'[domain]':$smarty.capture.cdata nofilter}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3157 posts

Posted 22 June 2018 - 02:56 PM #5

This is fantastic, must have feature for ultimate with many store fronts. Thank you!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17613 posts

Posted 25 June 2018 - 06:30 AM #6

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.