- Posts: 239
- Thank you received: 8
show_tabular.php
7 years 2 months ago #308900
by Bender
show_tabular.php was created by Bender
-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.5
-- PHP version -- : 7
Hi,
I want to add code to the product page written in php, which will extract information from the database by product code and display it on the screen. Which file do I need to make changes so that when Hikashop updating my changes are not deleted and at the same time Hikashop doesn’t break? Can I do this directly in show_tabular.php?
-- Joomla version -- : 3.9.5
-- PHP version -- : 7
Hi,
I want to add code to the product page written in php, which will extract information from the database by product code and display it on the screen. Which file do I need to make changes so that when Hikashop updating my changes are not deleted and at the same time Hikashop doesn’t break? Can I do this directly in show_tabular.php?
Please Log in or Create an account to join the conversation.
7 years 2 months ago #308902
by nicolas
Replied by nicolas on topic show_tabular.php
Hi,
If you do your change via the Display>Views menu, as we recommend on the tutorial below, you won't loose your changes when you update:
www.hikashop.com/support/documentation/1...-display.html#layout
If you do your change via the Display>Views menu, as we recommend on the tutorial below, you won't loose your changes when you update:
www.hikashop.com/support/documentation/1...-display.html#layout
Please Log in or Create an account to join the conversation.
6 years 7 months ago - 6 years 7 months ago #315134
by Bender
Replied by Bender on topic show_tabular.php
Hi
I checked php error log today and found a lot of warnigns like this
WARNING: [pool www] child (NNNNN) said into stderr: "NOTICE: PHP message: PHP Notice: Undefined index: cid in /.../html/com_hikashop/product/show_tabular.php on line 315"
the 315 line is
from this script
How to fix ?
I checked php error log today and found a lot of warnigns like this
WARNING: [pool www] child (NNNNN) said into stderr: "NOTICE: PHP message: PHP Notice: Undefined index: cid in /.../html/com_hikashop/product/show_tabular.php on line 315"
the 315 line is
Code:
var data = "product_id=<?php echo $_REQUEST['cid']; ?>&characteristic_id="+this.value;
from this script
Code:
<script type="text/javascript">
jQuery(document).ready(function(){
if(jQuery('.hikashop_product_characteristics_table select').length == 2){
jQuery('.hikashop_product_characteristics_table select:first').on('change',function(){
var data = "product_id=<?php echo $_REQUEST['cid']; ?>&characteristic_id="+this.value;
jQuery.ajax({
type: "POST",
url: "index.php?option=com_ajax&plugin=wwmhikavariantfix&format=raw",
data: data,
success: function(data){
if(data !== 0){
jQuery('.hikashop_product_characteristics_table select:last').html(data);
jQuery('.hikashop_product_characteristics_table select:last').trigger('change');
}
}
});
});
}
})
</script>
How to fix ?
Last edit: 6 years 7 months ago by Bender.
Please Log in or Create an account to join the conversation.
6 years 7 months ago #315151
by nicolas
Replied by nicolas on topic show_tabular.php
Hi,
There is no such line in show_tabular.php nor such block of code.
Also, the file path indicates that you're looking at a view override of show_tabular.php
So I suppose that this is some code that you added yourself.
Now, as a simple fix, you can change the line:
to:
it should remove the notice message.
There is no such line in show_tabular.php nor such block of code.
Also, the file path indicates that you're looking at a view override of show_tabular.php
So I suppose that this is some code that you added yourself.
Now, as a simple fix, you can change the line:
Code:
var data = "product_id=<?php echo $_REQUEST['cid']; ?>&characteristic_id="+this.value;
Code:
var data = "product_id=<?php echo @$_REQUEST['cid']; ?>&characteristic_id="+this.value;
Please Log in or Create an account to join the conversation.
6 years 7 months ago #315173
by Bender
Replied by Bender on topic show_tabular.php
Excuse me please Nicolas.
It is indeed not a Hikashop script.
Thanks a lot.
It is indeed not a Hikashop script.
Thanks a lot.
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds