News:

Support the VirtueMart project and become a member

Main Menu

Category 'Default Product Details Page' not working?

Started by randomdev, October 11, 2012, 03:24:01 AM

Previous topic - Next topic

randomdev

Using vm 2.0.6 (cannot upgrade)
The custom default2.php override is selected in the categories 'Default Product Details Page' but it is not being applied when I visit products of this category?

Anyone have any ideas on how to fix or find out what is causing the issue?


jenkinhill

Maybe try calling the override something different, rather than default.
Are you also overriding the individual sub-templates in the details directory?   http://forum.virtuemart.net/index.php?topic=98505.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

randomdev

I tried another name with no effect.

I only have the category specific override file in the templates html/productdetails/ directory, is this correct? (I only need to override default.php)

If i did create the sub-templates are they just named after the ovveride template? e.g. if override is catgtemplate, cattemplate_manufacturer.php etc?

randomdev

Have rebuilt site from scratch and am still having the same problem in vm 2.0.14 with vm SEF enabled?

If i go to a product and set the product detail page override this works, however the 'Default Product Details Page' under categories does not seem to work

Mediart

Quote from: randomdev on November 22, 2012, 05:49:15 AM
Have rebuilt site from scratch and am still having the same problem in vm 2.0.14 with vm SEF enabled?

If i go to a product and set the product detail page override this works, however the 'Default Product Details Page' under categories does not seem to work

I have spent 2 days trying to work this out.

I have done the same thing. Brand new Joomla 2.5.8. Brand new VM 2.0.14. I have been careful not to touch a single file here. I have just used the existing templates (default and PDF).

I set VM main config to use "defualt" then set a product to use "PDF" - this works ok. Remove the seetings from the product and add it to the category "Default Product Details Page - set to PDF" refresh the product page and it reverts to "Defualt".

Either the templating has a bug or maybe there are some server config issues I am unaware of. Please if anyone knows a work around I have to have this working - I can not affort to have to assign a template to each of the 1500 products.

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Mediart

#6
I thought I wrote that quite clearly. This is nothing to do with the functionality of the PDF template. It is an issue with the functionality of the Category config.

I have even tried this in your demo site and it does not work there either.


  • go into virtuemart main config and set the "Product layout" to default
  • Go into a category and set the "Default Product Details Page" to PDF (or any other original template)
  • in the front of the website, navigate to look at a product details page that is in the category that was assigned the PDF template.

The product details page is using the default template. I am sure this is not how it is supposed to work.

The only way I can see that I have to get it to work is manually go into every product within that category and assign it's product details page template to PDF. I really hope this is not the case as I have 1500 products in this store and the time required to do this would be unrealistic. The old VM1 site (in J1.5) that we are upgrading them from is working with this functionality as explained. I strongly believe that it is not functioning in the VM2 series or it has to be done a different way. This will be the 3rd day straight that I am trying to work this out.

FYI - I am a joomla dev of over 8 years and been using VM for quite a long time too. It looks like I will be doing a guest speaker spot at Joomla Day Australia (Jan 2013). I was going to talk about the requirements and methodology of migrating data between versions of Joomla Components. I was intending on using my VM1 to VM2 conversion (that I built in Altova Mapforce 2013) as an example. It will not be likely if I was unable to complete the project requirements as specified.

See: http://www.mediart.com.au/images/stories/clayconv/clayton-mapping-example.png to see what we are building.


Mediart

Thanks for the heads up Randomdev! That post helped a lot. I know it is a work around but at least I can move forward on my project. I just finished writing and Implementing this SQL script which enabled me to put a product template (taken from category) in for each product... Ah well.

SELECT a.virtuemart_product_id, t.category_product_layout
FROM zrgfw_virtuemart_products a INNER JOIN zrgfw_virtuemart_product_categories ta
   ON a.virtuemart_product_id = ta.virtuemart_product_id JOIN zrgfw_virtuemart_categories t
   ON ta.virtuemart_category_id = t.virtuemart_category_id
WHERE t.category_product_layout = 'vp-claytonnobuy'
ORDER BY a.virtuemart_product_id ASC