Using Module Class Suffix from third-party template within Virtuemart

Started by millzners, April 08, 2013, 18:56:09 PM

Previous topic - Next topic

millzners

Virtuemart 2.0.20b
Joomla 2.5.8
PHP 5.3.13

I've been working with a RocketTheme template and VirtueMart and I would like to know how to apply a Module Class Suffix from that template to the some of the default.php files within VM.  I have already successfully disabled VM CSS and began overriding the files.  In other words I'm making changes to "template\mytemplate\html\mod_virtuemart_product\default.php" and they're showing up on the site.

Example:  the RocketTheme has several Module Class Suffix defined like "box1" or "shadow1".  When these are applied the standard way through the Joomla Administrator interface ie Extensions->Module Manager->etc., they work.  However I would like to apply them not to an entire module, but to inner parts of the module.  In this example I would like each individual 'featured product' to have "box4" applied.  I edit "template\mytemplate\html\mod_virtuemart_product\default.php"

<?php foreach ($products as $product) { ?>
         <div class="box4 <?php echo $pwidth ?> <?php echo $float ?>"> I add the bolded text to the file and update the site

Firebug now shows the following:

<div class="box1 shadow1">  this is coming from Module Class Suffix field entered in the Joomla Admin interface, and they are affecting the formatting of the entire module
<div class="rt-block">
<div class="rt-module-surround">
<div class="rt-module-inner">
<div class="module-content">
<div class="vmgroupbox1 shadow1">
<div class="vmproductbox1 shadow1 productdetails">
<div class="box4 width33 floatleft"> These are coming from the change to the default.php file I showed above, and it has no apparent effect
<div class="box4 width33 floatleft">
<div class="box4 width33 floatleft">


So the result is that despite the changes showing up where I believe they need to be, they don't actually change anything on the site.  What am I missing?

Thanks!

millzners

After inspecting the demo site for the third-party template with FireBug I found the solution to be: replace the Module Class Suffix (in my example "box1") with the class suffix built into the RocketTheme template for another shopping chart extension in this case "xxxx-productBrowser-details-thumbnail".  Apparently the template supports a few other shopping cart extensions but not VM. 

In many cases a separate <div> tag is necessary to isolate the image.

Now I wonder if I should add custom support for these on the backend of VM on my site so I can change them there instead of editing the default.php files every time...  It wouldn't be my first MVC experience but I'm reluctant because I assume anything I do there will get blown away with an update.  I could also add the support to the template instead of VM...


t68

Sorry I can not help you, but I´ll tag along on your request.

I´m trying to accomplish almost exactlyg the same thing: to get RT template styling to apply to VM content. In my case I´m interested in styling the VM content that´s part of the main component for the shop front page (or what it´s called), for example the featured product listing and category listing. I also have figured that I probably need to alter php code to call on these classes. But I´m not sure how to or if I´m even right. I got a working custom css but I´m not sure how to use it in this case since the parameters calling for Rockettheme styling is not in the page code on this parts.

Or is there maybe some part in the VMsettings that can accomplish this?