Customise quantity.php template

  • Posts: 233
  • Thank you received: 4
  • Hikashop Business
9 years 1 month ago #247788

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6

Hello,
I've found the quantity.php template which I believe controls how the quantity box and add to cart button is dsiaplyed on the site, when I compare the HTML output of the page with the PHP in the template file I cannot find where the <table> code is being generated.

How can I modify this <table> code? which file generates this code?

Thanks

Lee

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

  • Posts: 2143
  • Thank you received: 747
9 years 1 month ago #247792

Hi,

Indeed it's not a "quantity.php" file you want to modify.

Have you looked up the documentation? It's of great help: www.hikashop.com/support/documentation/1...-display.html#layout
First it helps you with creating proper view/layout overrides (instead of modifying core files).
Then, at the bottom of the page, you find an image telling you which element on the product page is generated by which view.

So, you want to work on the view "product / show_quantity".


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: ltempest

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

  • Posts: 233
  • Thank you received: 4
  • Hikashop Business
9 years 1 month ago #247794

Lousyfool,
Yes I did indeed search the documentation, obviosuly not well enough, that screenshot is very helpful thanks.

I am using template overrides correctly and did discover the show_quantity.php file.

Thanks

Lee

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

  • Posts: 26275
  • Thank you received: 4045
  • MODERATOR
9 years 1 month ago #247790

Hi,

Which table are you talking about ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 233
  • Thank you received: 4
  • Hikashop Business
9 years 1 month ago #247870

If you check out this page:

Development site

You can see the Characteristics 200ml or 60ml radio buttons. It is these I want to modify to remove the <table> code and replace with <div> and add the site styles to the radio buttons.

But the only place I can find that is generating this code is in this file:

/administrator/components/com_hikashop/types/characteristic.php

Does that help?

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

  • Posts: 2143
  • Thank you received: 747
9 years 1 month ago #247877

@ltempest:

Sorry, your topic's subject is mentioning "quantity.php", and in your initial post you're clearly asking "how the quantity box and add to cart button is dsiaplyed" and "this <table> code".
So, please understand if this is what I responded to.

Now you're pointing at the characteristics radios instead. Well... yes, that <table> is generated in the file /administrator/components/com_hikashop/types/characteristic.php


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 9 years 1 month ago by lousyfool.

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

  • Posts: 233
  • Thank you received: 4
  • Hikashop Business
9 years 1 month ago #247879

Lousyfool,
Apologies, I have resolved the quantity template issue thanks to you pointing me to the correct show_quantity.php file.

I then followed up with the question regarding the characteristics and wanted to confirm I was editing the correct file, which it does appear to be, its unfortunate that this is not a template file but I need to edit a core file in the administrator folder to modify the visual style.

Lee

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

  • Posts: 2143
  • Thank you received: 747
9 years 1 month ago #247884

Haha, you see it's sometimes really better to start a new topic for a new question. ;)

Since you're talking "visual style", are you sure it requires editing the core file? Shouldn't it be possible with only CSS?


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 233
  • Thank you received: 4
  • Hikashop Business
9 years 1 month ago #247887

Lousyfool,
Yeah possibly I should've created a new topic!
Unfortunately, the styling changes I need to make are not possible with just CSS, I also want to remove the <table> code and replace with the bootstrap formatting used by my template.

Looks like I'll have to make the changes and then monitor the updates to ensure it does not get overwritten!

Thanks for all your help!

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

Time to create page: 0.077 seconds
Powered by Kunena Forum