Can the price be moved to the customize tab?

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #161316

Hi,

I made customized tabs for our product pages using NoNumber(image attached). The question is: Is it possible to move the product price to the Description tab? Just wondering.

Wella

Attachments:
Last edit: 11 years 2 months ago by Wella.

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

  • Posts: 84300
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #161329

Hi,

The only solution I can see is to use the product content tags system of HikaShop to do that automatically:
www.hikashop.com/support/support/documen...-product-insert.html

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #161475

Hi,

Thanks for your fast reply again. I really appreciate it.

I've looked at your proposal to solve my problem, as far as I understand this is going about how to add hika products to other location for instance an article.
The situation is: I have now a product page, on the left side is a picture, and on the right side the price and the add to cart. What I want is that the price goes to a tab of the NoNumber plugin. So moving the position of this price module, so it's not longer showing direct to the customer but only if they click on one of the tabs. So we are searching for how to place a module in a tab or maybe double how to hide the module at the right side of the product page and place it in a tab.

I've tried with your solution to get he price into the tab but that was not working. Or did I missed something? Can also be my lack of knowledge aboout this.

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

  • Posts: 84300
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #161491

Hi,

The default price display is not a module, so you can't move it around like you want.
That's why I recommended to use a product tag instead.
What tag did you use in your tab ? It should be working fine.

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #161584

Hi Nicolas,


Thanks for your help.

It is now confirmed that the price is not a module. It helps me to understand better the system.


This should be the tag:
{product}22|quantityfield|pricedis3|pricetax1{/product}


1. As I understand I have to go to Content, Article Manager then new, then I’ll insert the tag using the “Product” button. I did it, but there are no changes on the page. Or I missed something?

2. What I have tried as experiment was: I went to Hikashop, Products then open the product page and copied the tag above and paste it under the “Description” tab, and yes it appears inside the tab, only, I now have 2 displayed prices(please see attachment) and it is located at the right side. It should be at the left side if possible.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #161592

Hello,
An easier solution can be to hide the product price by using some CSS code or the "Display price" option through "Hikashop->System->Configuration->Display" and to directly add your product price through your product description.

The following user(s) said Thank You: Wella

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #161731

Hi Mohamed Thelji,

Super! This one works, so at least I now have one solution. But my question 1 is still open and that was how can I do this automatically because I have to go for thousands of products when I have to do this each time by hand it's quite time consuming because I have to go to Article manager, copy the tag then paste it in Hikashop product page and a high risk for failure. I understand out of the answer of Nicolas that I can do this automatically, at least we know it is possible to place the price inside the tab, I now have a price inside the tab and switched off the price next to the product(please see attachment). But now how to do this centralized?

Thank you for your reply.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #161734

Hi,

Sorry, not sure to understand all the situation correctly.

How do you have added the tabs of NoNumber in the product page ? By editing the view "product / show_default" (or another one) and adding the NoNumber tags for the tabs ?

If it is, so you just have to move the product price part of the view inside the desired tab.
Else, I guess it's the better way to have what you need.

To edit the content, here is a tutorial:
hikashop.com/support/support/documentati...ize-the-display.html

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #161924

Thank you all for your answer.

@ Xavier, At first I want to add the code for the tabs and do it centralize but I came to the solution that it is not handy because we don't use standard number of tabs, basically we must have 4 tabs in a product page, but if we have to add more tabs in that particular product then the question will be: Is that possible to just add the tab code direct to the product page as additional? Or not? Or, it is possible but will be overruled when there are updates or whatever that will influence that coding. So what I am now doing is use the JCK content template where we can make different templates for 3, 4 tabs and so on. And yes, I think I can do the product tag manually :( or place it also in JCK content template and just edit the product number or ID.

In relation to this, Can I move the entire tabs next to the Image(at the right side particularly)? How?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #162601

Hi,

As I don't know how work JCK content template, I don't really understand where is the situation at this time :/
Are you able to display the tabs as you want ?

To move the entire tabs, it can potentially be done with some css.

To have custom tabs, and customized by products, a solution could be to add the NoNumber tags in the product description in the product edition page. This way it is displayed in the description part, and to move this part next to the image, edit the view "product / show_default" and move the part at the desired place.

If you want to display the price in the tab, so the plugin "sourcerer" (or another one) allow you to put php code in the text editor.
This way you can have <?php echo $this->element->prices[0]->price_value; ?> (this is an example).

You can find here documentation about layout customizations:
hikashop.com/support/support/documentati...ize-the-display.html

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #162805

Hello Xavier,


Yes, I have now tabs using the JCK content template as well as table, displayed in my product pages:

The wishes are:
1. The tabs should be at the right side = thank you, this is solved

2. The price inside the description tab, using JCK content template is done manually using product tagstaken from the article = So with this, it is solved but it can be better :cheer:
I installed the "sourcerer" plugin and tried to place it inside the description tab, the entire hikashop layout is gone(please see attachments as a comparison).

I am not strong enough with my coding capabilities, can you please tell me what the entire code for the price is? I'll try to place it in the JCK template, so I have all I want in 1 JCK button content template.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #162807

Hi,

The full code is "<?php echo $this->element->prices[0]->price_value; ?>".
But there is maybe a compatibility issue between sourcerer and the tabs.

The following user(s) said Thank You: Wella

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #163021

Hi Xavier,

I have tried to apply your code using the Sourcerer inside my tab but the complete Hikashop product layout is messed up. Sourcerer for me is new so I’ve asked at their forum, can be that I missed something and show what code I have used but I understand from them that their there is no compatibility issue between the two, they said that the php is not complete and they pointed the “$this”. They said that it isn't defined anywhere, and neither are the nested classes. So I’m now back to you :lol: what must be replaced by the “$this” to let this work fine?

Last edit: 11 years 2 months ago by Wella.

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

  • Posts: 84300
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #163041

Hi,

The method proposed by Xavier won't work.
Sourcerer doesn't have knowledge of the variables of the product page.
That's why $this doesn't exist for sourcerer.

But yes, doing it like I explained can't be done automatically for all the products at once via the interface. That's however the simplest.

Doing it with sourcerer, you'll have to add more complex code in it. And actually, it's really complex as it involves a lot of code to do that (getting the current product id, loading the product data, loading the prices, loading the price display interface with the product price) and it will even require to modify the code of HikaShop directly. So it's not a viable solution.

I would still recommend to use my proposition.
To add all the tags in your products description in one go, you will require to run a mysql query in your phpmyadmin:

UPDATE #__hikashop_product SET product_description = concat(product_description,'{product}', product_id,'|quantityfield|pricedis3|pricetax1{/product}');
where #__ is your table prefix.

The following user(s) said Thank You: Wella

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

  • Posts: 63
  • Thank you received: 6
11 years 2 months ago #163085

Hi Nicolas,


This is probably the best solution, I think it is going too far for us to implement this into our system, I’m afraid it is getting uncontrollable. If I understand you well, we really have to make changes in the database. I cannot overlook with my level of knowledge now what will happen. What if Hikashop or Joomla has an update and, maybe other consequences of that?

Our motivator to have this is that, we do not want that our products are only compared with the lowest price. We like that our customers first search for the best solution. The easiest way is, to not directly show the price but that is inside the tab. Out of all the answers, I understand that it is not easy to do. Maybe it is something Hikashop can implement in the future. Of course, due to this super idea we get the code for free when it works :P

For now we’ll stick to the product tags.

Thank your very much to everybody who helped and gave us ideas to solve our problems.

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

  • Posts: 84300
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #163121

Hi,

The query I propose doesn't change anything in the database structure. It's just to add the tags easily in the product_description of all the products. It won't have any consequences for updates of Joomla or HikaShop.

Having the price displayed dynamically is the case by default and you could have it inside tabs quite easily with the default tabs system of HikaShop. But with a content plugin tab system inside the description of the products, it gets indeed complex because of the way all that needs to play along.

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

Time to create page: 0.098 seconds
Powered by Kunena Forum