BUTTON to product in article
5 years 8 months ago #329171
by Remko
BUTTON to product in article was created by Remko
-- url of the page with the problem -- :
www.edsmusic.nl/newjingle
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.4.14
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : No error message
To display some information about several products I use the "HikaShop Product TAG insertion"-plugin. When a product had variants, there is a button "Choose Options" ("Kies opties en bestel!" in my Dutch translation). But when a product has no options, it becomes an "Add to Cart"-button.
Is it possible to make the button always a "link to the product button"? The client has to add some custom text, before it can be added to the cart.
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.4.14
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : No error message
To display some information about several products I use the "HikaShop Product TAG insertion"-plugin. When a product had variants, there is a button "Choose Options" ("Kies opties en bestel!" in my Dutch translation). But when a product has no options, it becomes an "Add to Cart"-button.
Is it possible to make the button always a "link to the product button"? The client has to add some custom text, before it can be added to the cart.
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329202
by nicolas
Replied by nicolas on topic BUTTON to product in article
Hi,
Edit the file add_to_cart_ajax.php via the menu Display>Views and change the line:
to:
And it should do that.
Edit the file add_to_cart_ajax.php via the menu Display>Views and change the line:
Code:
$has_options = !empty($this->row->has_options) || (!$display_fields && $has_required_fields);
Code:
$has_options = true;
The following user(s) said Thank You: Remko
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329208
by Remko
Replied by Remko on topic BUTTON to product in article
Thanks! That did the job!
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329690
by Remko
Replied by Remko on topic BUTTON to product in article
Now I have to say "It worked".... It does not work anymore. Since Hikashop 4.4.1 the HikaShop Product TAG insertion does not work properly. It generates an error as you can see at
www.edsmusic.nl/jingles-test
.
I can insert the Product insertion by using the button in the editor, but as soon I visit that page, there is an error. When I remove the tag from the article, the error is gone.
I can insert the Product insertion by using the button in the editor, but as soon I visit that page, there is an error. When I remove the tag from the article, the error is gone.
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329692
by nicolas
Replied by nicolas on topic BUTTON to product in article
Hi,
I can't access that page. It requires a special access I don't have.
So I can't see the error you're talking about.
Please activate the "debug mode" and "error reporting" settings of the Joomla configuration and access the page with the issue again. Then, please provide a screenshot of all the error information provided (you might have a call stack, etc).
I can't access that page. It requires a special access I don't have.
So I can't see the error you're talking about.
Please activate the "debug mode" and "error reporting" settings of the Joomla configuration and access the page with the issue again. Then, please provide a screenshot of all the error information provided (you might have a call stack, etc).
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329694
by Remko
Replied by Remko on topic BUTTON to product in article
Hi,
Is the information below the information you need?
Call to a member function getTemplate() on null
/home/edsmusic/domains/edsmusic.nl/public_html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378
Call stack
# Function Location
1 () JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378
2 plgSystemHikashopproductInsert->_processProduct() JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:124
3 plgSystemHikashopproductInsert->onAfterRender() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
6 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/libraries/src/Application/CMSApplication.php:1050
7 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:778
8 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:202
9 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Of course I can make a screenshop as well, but with the text above you can copy and paste is you like...
Is the information below the information you need?
Call to a member function getTemplate() on null
/home/edsmusic/domains/edsmusic.nl/public_html/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378
Call stack
# Function Location
1 () JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:378
2 plgSystemHikashopproductInsert->_processProduct() JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:124
3 plgSystemHikashopproductInsert->onAfterRender() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
6 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/libraries/src/Application/CMSApplication.php:1050
7 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:778
8 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:202
9 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Of course I can make a screenshop as well, but with the text above you can copy and paste is you like...
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329706
by nicolas
Replied by nicolas on topic BUTTON to product in article
Hi,
A copy / paste is even better
Thanks for the information. I was able to add a patch for this.
Download the install package of HikaShop 4.4.1 on our website and install it again on yours and it will fix that error which was introduced with the addition of the hkhide / hkshow tag feature.
A copy / paste is even better
Thanks for the information. I was able to add a patch for this.
Download the install package of HikaShop 4.4.1 on our website and install it again on yours and it will fix that error which was introduced with the addition of the hkhide / hkshow tag feature.
The following user(s) said Thank You: Remko
Please Log in or Create an account to join the conversation.
5 years 8 months ago #329743
by Remko
Replied by Remko on topic BUTTON to product in article
Thank you very much! Problem solved... again
Please Log in or Create an account to join the conversation.
Time to create page: 0.123 seconds