Skip to main content

Page title on checkout

12 years 6 months ago #152983 by jdoe
Page title on checkout was created by jdoe
Using the latest version 2.3.0 starter.

When I go to checkout process my page title (in browser) changes in a way that it loses my website's name I set in Global configuration of joomla. It's fine when just browsing the category/product listing and on product pages.

How can I add website name to the checkout process?

thanks

Please Log in or Create an account to join the conversation.

12 years 6 months ago #152994 by nicolas
Replied by nicolas on topic Page title on checkout
Hi,

You'll have to add the code:
Code:
$document = JFactory::getDocument(); $checkout_name = JText::_('CHECKOUT'); if (empty($checkout_name)) { $checkout_name = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $checkout_name = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $checkout_name); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $checkout_name = JText::sprintf('JPAGETITLE', $checkout_name, $app->getCfg('sitename')); } $document->setTitle( strip_tags($checkout_name) );
after the line:
Code:
$this->assignRef('display_checkout_bar',$this->display_checkout_bar);
in the file components/com_hikashop/views/checkout/view.html.php
The following user(s) said Thank You: jdoe

Please Log in or Create an account to join the conversation.

12 years 6 months ago - 12 years 6 months ago #153126 by jdoe
Replied by jdoe on topic Page title on checkout
Thank you, it worked.
What will happen after future hikashop updates with files changed like that?

Also, I would like for pages User control panel, orders and addresses to have site name in browsers as well. Can you give me a hint?

Any reason why this doesn't act as set-up in global configuration of joomla?
Last edit: 12 years 6 months ago by jdoe.

Please Log in or Create an account to join the conversation.

12 years 6 months ago #153149 by nicolas
Replied by nicolas on topic Page title on checkout
You will loose such change done directly to the files when you update. The preferred method is to edit a view file via the menu Display->Views to add such code addition.
However, this modification will be included in next version of HikaShop, so you won't need to add it again after you update.

For the other pages, similar modifications will be done for next release of HikaShop so if you update HikaShopin a month, you'll get the titles everywhere. If you want to add that in the mean time, you would have to basically edit all the view.html.php files of the components/com_hikashop/views subfolders and add it to the listing/show functions there if no$document->setTitle call already present and simply change the line:
$checkout_name = JText::_('CHECKOUT');
to:
$checkout_name = 'My title';

where My title is the page title you want for the page.

It didn't act as set-up in the global configuration of Joomla because it has to be handled by each extension and that this parameter wasn't taken into account so far for these pages.

Please Log in or Create an account to join the conversation.

12 years 6 months ago #153236 by jdoe
Replied by jdoe on topic Page title on checkout
Sorry, but I cant find the line $checkout_name = JText::_('CHECKOUT') anywhere in those 'view.html.php' files. Folders I looked in: 'address', 'order' and 'user'.

Please Log in or Create an account to join the conversation.

12 years 6 months ago #153259 by Xavier
Replied by Xavier on topic Page title on checkout
Hi,

I think that Nicolas was talking about the code he gave you previously.
www.hikashop.com/forum/checkout/867590-p...checkout.html#152994

After having added that code, you can replace the line by what you want.

Please Log in or Create an account to join the conversation.

12 years 6 months ago #154466 by ranger-b
Replied by ranger-b on topic Page title on checkout
You could use a plugin for SEO such as this: EFSEO - Easy Frontend SEO

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum