BUTTON to product in article

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
4 years 1 month ago #329171

-- 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.

Attachments:

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
4 years 1 month ago #329202

Hi,

Edit the file add_to_cart_ajax.php via the menu Display>Views and change the line:

$has_options = !empty($this->row->has_options) || (!$display_fields && $has_required_fields);
to:
$has_options = true;
And it should do that.

The following user(s) said Thank You: Remko

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
4 years 1 month ago #329208

Thanks! That did the job!

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
4 years 3 weeks ago #329690

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.

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
4 years 3 weeks ago #329692

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).

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
4 years 3 weeks ago #329694

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... ;-)

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
4 years 3 weeks ago #329706

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.

The following user(s) said Thank You: Remko

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
4 years 3 weeks ago #329743

Thank you very much! Problem solved... again ;-)

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

Time to create page: 0.070 seconds
Powered by Kunena Forum