- Posts: 100
- Thank you received: 1
Product Page - When Select a Characteristic
14 years 2 months ago #58923
by reders
Product Page - When Select a Characteristic was created by reders
Hi,
I am developing a site using Hikashop, the link to a product page is:
www.s387718370.websitehome.co.uk/Proofs/...440#delivery-returns
I have the product page set out how i need it, the issue i have is when i change the size characteristic the page is changing.
Its like the page is loading a new file which does not include the changes to the show_default.php (product) i have made.
How do i fix this?
Thanks in advanced
Sean R.
I am developing a site using Hikashop, the link to a product page is:
www.s387718370.websitehome.co.uk/Proofs/...440#delivery-returns
I have the product page set out how i need it, the issue i have is when i change the size characteristic the page is changing.
Its like the page is loading a new file which does not include the changes to the show_default.php (product) i have made.
How do i fix this?
Thanks in advanced
Sean R.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
14 years 2 months ago #58924
by Mohamed Thelji
Replied by Mohamed Thelji on topic Re: Product Page - When Select a Characteristic
Hello,
I think that your problem is just coming from your product's variants description, you should :
- Go to your product page
- Manage variants
- Set the same product description as the "main product" OR just delete all the variant's product description.
Hope this will help you.
I think that your problem is just coming from your product's variants description, you should :
- Go to your product page
- Manage variants
- Set the same product description as the "main product" OR just delete all the variant's product description.
Hope this will help you.
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58929
by reders
Replied by reders on topic Re: Product Page - When Select a Characteristic
Hi, thanks for the quick response,
The product's variants description's are empty.
The product description for the parent product is simply:
<p>Elegant bandeau maxi dress with twist front detail in digital print chiffon.</p>
The slides are hard coded into the show_default.php (product) file, like so:
<div id="hikashop_product_description_main" class="hikashop_product_description_main">
{slide=About this Product}
<?php
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description));
?>
{slide=Details & Care}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dictum congue tellus eu imperdiet. Phasellus enim libero, viverra
eget mattis sed, dapibus id lacus. In vel felis sapien, porttitor eleifend lacus. Duis a tellus nisl, eu feugiat sem. Praesent
nec mauris ac mi feugiat ultrices eget vel nunc.
{slide=Delivery & Returns}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dictum congue tellus eu imperdiet. Phasellus enim libero, viverra
eget mattis sed, dapibus id lacus. In vel felis sapien, porttitor eleifend lacus. Duis a tellus nisl, eu feugiat sem. Praesent
nec mauris ac mi feugiat ultrices eget vel nunc.
{/slides}
</div>
I think i need a different fix.
Thanks
Sean R.
The product's variants description's are empty.
The product description for the parent product is simply:
<p>Elegant bandeau maxi dress with twist front detail in digital print chiffon.</p>
The slides are hard coded into the show_default.php (product) file, like so:
<div id="hikashop_product_description_main" class="hikashop_product_description_main">
{slide=About this Product}
<?php
echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$this->element->product_description));
?>
{slide=Details & Care}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dictum congue tellus eu imperdiet. Phasellus enim libero, viverra
eget mattis sed, dapibus id lacus. In vel felis sapien, porttitor eleifend lacus. Duis a tellus nisl, eu feugiat sem. Praesent
nec mauris ac mi feugiat ultrices eget vel nunc.
{slide=Delivery & Returns}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dictum congue tellus eu imperdiet. Phasellus enim libero, viverra
eget mattis sed, dapibus id lacus. In vel felis sapien, porttitor eleifend lacus. Duis a tellus nisl, eu feugiat sem. Praesent
nec mauris ac mi feugiat ultrices eget vel nunc.
{/slides}
</div>
I think i need a different fix.
Thanks
Sean R.
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58974
by nicolas
Replied by nicolas on topic Re: Product Page - When Select a Characteristic
That's because you did your modification in the file "show_default" where the default layout is displayed, but not in the "show" file where the variants data is added to the page.
So when you change the characteristic it just displays the default description instead of the modified one you added.
The best is to simply delete the code displaying the variant description in the "show" file of the "product" view:
<div id="hikashop_product_description_<?php echo $variant_name;?>" style="display:none;">
<?php echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description));?>
</div>
So when you change the characteristic it just displays the default description instead of the modified one you added.
The best is to simply delete the code displaying the variant description in the "show" file of the "product" view:
<div id="hikashop_product_description_<?php echo $variant_name;?>" style="display:none;">
<?php echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description));?>
</div>
The following user(s) said Thank You: reders
Please Log in or Create an account to join the conversation.
14 years 2 months ago #59075
by reders
Replied by reders on topic Re: Product Page - When Select a Characteristic
Hi, Thanks for your response, this have fixed my problem.
I just have another small problem,
When the page is using the "show_default" file, the link for first small image is loaded like so:
<a id="hikashop_image_small_link_first" class="hikashop_image_small_link" ... >
When i select a characteristic, and the page uses the "show" file, the link for first small image is loaded like so
<a class="hikashop_image_small_link" ... >
I am using the css:
#hikashop_image_small_link_first img.hikashop_child_image {
margin-left: 0;
}
to remove the margin-left from the first small image.
I need the first image to be loaded with a different/additional class, how do i do this?
Thanks
Sean R.
I just have another small problem,
When the page is using the "show_default" file, the link for first small image is loaded like so:
<a id="hikashop_image_small_link_first" class="hikashop_image_small_link" ... >
When i select a characteristic, and the page uses the "show" file, the link for first small image is loaded like so
<a class="hikashop_image_small_link" ... >
I am using the css:
#hikashop_image_small_link_first img.hikashop_child_image {
margin-left: 0;
}
to remove the margin-left from the first small image.
I need the first image to be loaded with a different/additional class, how do i do this?
Thanks
Sean R.
Please Log in or Create an account to join the conversation.
14 years 2 months ago #59162
by nicolas
Replied by nicolas on topic Re: Product Page - When Select a Characteristic
If you delete the code in the "show" file as I proposed, you won't have that problem.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #59274
by reders
Replied by reders on topic Re: Product Page - When Select a Characteristic
Hi,
Sorry i should of specified that i will be uploading extra images for each color variant, deleting the code in the "show" file will stop the extra images showing when you select the characteristic.
Thanks
Sean R.
Sorry i should of specified that i will be uploading extra images for each color variant, deleting the code in the "show" file will stop the extra images showing when you select the characteristic.
Thanks
Sean R.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #59314
by nicolas
Replied by nicolas on topic Re: Product Page - When Select a Characteristic
It's not really possible. That id attribute was not meant to be used for that in the first place.
It will require that you hack the code of the file administrator/components/com_hikashop/helpers/image.php and change the code in the display function so that the class is added. But it's not simple since you can't know in that file if it's the first image or not. So it would require to pass an extra parameter from the views to that function so that it would know if it's the first one or not. Also, you can't add it as an id because otherwise the id wouldn't be unique on the page, and that would create problems for HTML validation so you will have to use a class instead.
It's not impossible, but not easy to do I'm afraid.
It will require that you hack the code of the file administrator/components/com_hikashop/helpers/image.php and change the code in the display function so that the class is added. But it's not simple since you can't know in that file if it's the first image or not. So it would require to pass an extra parameter from the views to that function so that it would know if it's the first one or not. Also, you can't add it as an id because otherwise the id wouldn't be unique on the page, and that would create problems for HTML validation so you will have to use a class instead.
It's not impossible, but not easy to do I'm afraid.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #59316
by reders
Replied by reders on topic Re: Product Page - When Select a Characteristic
Hi,
Thanks for your response i will come up with a different css solution.
I cannot access the back end of your demo site, i'm getting a 403 forbidden error.
Can you fix this?
Regards
Sean R.
Thanks for your response i will come up with a different css solution.
I cannot access the back end of your demo site, i'm getting a 403 forbidden error.
Can you fix this?
Regards
Sean R.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #59396
by nicolas
Replied by nicolas on topic Re: Product Page - When Select a Characteristic
Thank you for the information. It's fixed now.
The following user(s) said Thank You: reders
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds