Skip to main content

getLayout

More
9 years 2 months ago #275477 by aminweb
getLayout was created by aminweb
-- HikaShop version -- : 2.6

hi,
I wrrite some code plugin.I have a problem!!!
Code:
if($view->getName() == 'product') { if($view->getLayout() == 'show_quantity') {
when change SHOW_QUANTITY to SHOW_TABULAR , dont work. why?
getLayout in hikashop which value?

Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

More
9 years 2 months ago #275480 by nicolas
Replied by nicolas on topic getLayout
Hi,

I suppose that you're using the onHikashopBeforeDisplayView(&$view) or onHikashopAfterDisplayView(&$view) triggers of HikaShop in your plugin.
These triggers are called once when a view is displaying. The sub layouts that are called by the main view file won't trigger these functions.
show_tabular and show_quantity are all sub view files called from the main view file "show". So if you want to do something on the product page, you should use the "show" string for your check of the layout.
The following user(s) said Thank You: aminweb

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

More
9 years 1 month ago - 9 years 1 month ago #275524 by aminweb
Replied by aminweb on topic getLayout
Thanks nicolas,
i useonHikashopAfterDisplayView(&$view)
Code:
function onHikashopAfterDisplayView($view) { $cheak = JFactory::getApplication()->input; if ($cheak->get('option') == 'com_hikashop' AND $cheak->get('ctrl') == 'product' AND $cheak->get('task') == 'show') { if($view->getName() == 'product') { if($view->getLayout() == 'show_quantity') {

now, which string use instead of show_quantity?

Joomla Developer | am.ebrahimzadeh[at]gmail.com
Last edit: 9 years 1 month ago by aminweb.

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

More
9 years 1 month ago #275530 by nicolas
Replied by nicolas on topic getLayout
Hi,

As I said, I think that you want to use "show" instead.

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

More
9 years 1 month ago #275573 by aminweb
Replied by aminweb on topic getLayout
but,when replace "show" instead of " show_quantity" , dont work...

Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

More
9 years 1 month ago #275574 by Jerome
Replied by Jerome on topic getLayout
Hello,

What is not working ?
Please be more precise if you want the support team to understand what you're doing and what is your problem.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 5 days ago #279574 by aminweb
Replied by aminweb on topic getLayout
I programming plugin for show field value by chart.
now I want show chart in bottom of product page.(bottom of description tab box)
now, what I do?
my function code :
Code:
function onHikashopAfterDisplayView($view) { $cheak = JFactory::getApplication()->input; if ($cheak->get('option') == 'com_hikashop' AND $cheak->get('ctrl') == 'product' AND $cheak->get('task') == 'show') { if($view->getName() == 'product') { if($view->getLayout() == 'show_quantity') {
please help me.thnks

Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

More
9 years 5 days ago #279580 by Mohamed Thelji
Replied by Mohamed Thelji on topic getLayout
Hello,

If you only want to do some view's modifications the solution will probably just be to directly edit the "show_quantity" or "show_default" file of the "product" view of your front-end template via "Hikashop->Display->Views".

www.hikashop.com/support/documentation/1...-display.html#layout

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

More
9 years 4 days ago #279636 by aminweb
Replied by aminweb on topic getLayout
This was not the answer to my question!

Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

More
9 years 4 days ago #279641 by Jerome
Replied by Jerome on topic getLayout
Hello,

Unfortunately, we are not able to give you any help since you do not follow our first indications.
Nicolas told you to use the "show" layout since it will be that specific layout you need to check and then interact with the page content.

So I'm afraid we can't tell you what to do next if you do not start to follow what to do now.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

Time to create page: 0.226 seconds
Powered by Kunena Forum