| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Related Products - List View? | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Related Products - List View?
Using the example given by Tony on the webinar yesterday (thanks for that Tony!), trying to change the default view for related products from grid to list view. Here's what I have done:
Created in my own theme XLite\Module\Alinc\AlincTheme\View\ItemsList\Upsel lingProducts\UpsellingProducts.php with the following code: PHP Code:
That said, it doesn't seem to be working. Am I going about this all wrong? -Mark
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Related Products - List View?
Mark, I am going to try and do the same thing, see what happens.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
Re: Related Products - List View?
Thanks Mike - my guess is I have the file in the wrong place and/or wrong file name and/or the class I am extending wrong. I am only now beginning to understand how the MVC architecture works...
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
|
#4
|
|||||||||
|
|||||||||
Re: Related Products - List View?
Well in this case it is the blind helping the blind, I am getting there, but my understanding is still newb level with XC5. The transition to OOP, MVC, and Doctrine2 logic all at once is splitting my head.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#5
|
|||||||
|
|||||||
Re: Related Products - List View?
I think you're very much in the majority there. The constant need to rebuild the cache is also a real development-killer - having to wait 30-60 seconds for a rebuild with every minor PHP tweak really limits the ability to plug at things until it starts working...
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Related Products - List View?
Mark,
Edit: I posted some comments that were utterly wrong, removed. Well I have attempted to duplicate your change. At first I thought I was on to something, but it proved worthless. I did notice one thing, your namespace is wrong I believe. namespace XLite\Module\Alinc\AlincTheme\View\ItemsList\Upsel lingProducts; Should just be: namespace XLite\Module\Alinc\AlincTheme\View\ItemsList; Still doesn't work though. I notice after rebuilding cache, that the new file we are creating is not copied into the var/run folder. Also since we are decorating the other class, I thought it would create a copy in the XC/Upselling/View/ItemsList directory, something like UpsellingProductsAbstract.php Is it the same for you? No copied file in var\run\Module\Alinc\AlincTheme\View\ItemsList ? It seems XC is ignoring our new file.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Related Products - List View?
Just discovered something that may be key to what we are doing. Searching for "extends XLite\Module" in the files produces 0 results.
So there is not a working example of a module extending another module.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#8
|
|||||||
|
|||||||
Re: Related Products - List View?
Mike,
Ok, so I can say that in my tests at least the module is being copied properly, but not to where you are looking - it is in var/run/classes/Xline/Module/Alinc/AlincTheme/View/ItemsList/UpsellingProducts/UpsellingProducts.php that said, it's not running it, at least as far as I can tell. The copy as it appears in the var/run shows up as: PHP Code:
And it is in fact turning it into UpsellingProductsAbstract when it compiles. Not sure why your code isn't making it at least that far,maybe an error in your Main.php? Attaching mine here. And like yourself I couldn't find anyone who has made a module that extends another module, although obviously there will be cases where people want to do exactly that.
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
#9
|
|||||||
|
|||||||
Re: Related Products - List View?
Ok, onto something here. Looks like people have extended other modules, for example the Social module (and others) extend SimpleCMS, the bit of code you need is:
PHP Code:
The Key is the @LC_Dependencies bit. So in our case we will be dependent on XC\Upselling. Trying this out...
__________________
X-Cart Gold Plus 4.6.5 Mods - WebsiteCM Dynamic Product Tabs, Smack Digital CDSEO Pro, AlteredCart Smart Search, AlteredCart One Page Checkout, Cart Works Power Filter, Firetank Software Feed Manager |
|||||||
|
#10
|
|||||||||
|
|||||||||
Re: Related Products - List View?
Very cool! Thanks Mark, this help me tremendously in some of my other projects. Waiting to hear back from you on how your tests go. I may be able to attempt this again myself later today...
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|