Demitry Posted October 17, 2019 Share Posted October 17, 2019 hi, I have BS Edge on PHP 7.2 and, ...I have a custom template layout. I am trying to figure out if there is a way to call individual modules within the oscTemplate block into different parts of my template. I know how the modules within a oscTemplate block can be managed via sort order and BS row width, but this does not work for my template structure. I could create a new module block and move those individual modules that I want in a different part of the template into that folder and then call that block into the template, but I would rather not create more module folders and instead, just pull individual modules out of the same module block and place them where I need them in my custom template. Is that possible? So, ..for example: the checkout_success.php page calls a block of modules in the /includes/modules/content/checkout_success/ folder using this code: $oscTemplate->getContent('checkout_success') In that content module folder are five individual modules and their related templates. I'm looking for a way to call each of these individually instead of as a whole block. Any help would be greatly appreciated. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
kgtee Posted October 17, 2019 Share Posted October 17, 2019 @burt has an example of applying certain modules on pages that they are meant to be working. He calls it "good_pages". I think this is a good reference for anyone who wants to DIY. Link to comment Share on other sites More sharing options...
kgtee Posted October 17, 2019 Share Posted October 17, 2019 Alternatively, one can also adopt the scripts in this module. The scripts enable modules to be active on selected pages only: Link to comment Share on other sites More sharing options...
Demitry Posted October 17, 2019 Author Share Posted October 17, 2019 @kgtee hi KG, thank you for the reply. I read Burt's post and both, his array of good_pages and the option of selecting the pages for the modules to be activated on, do not address the challenge I have with calling the individual modules from a module block. So, what I want to do is call each of the five modules within that /includes/modules/content/checkout_success/ folder, one at a time. That would allow me to place them where I want on the "same" page. I'm not trying to get these module to display on other pages. I want them all on the checkout_success.php page. However, to position them according to my custom template I need to call them individually. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
kgtee Posted October 17, 2019 Share Posted October 17, 2019 Hi @Demitry, now I understand more clearly what you are trying to get at. However, I regret that I am not able to help as I am not yet good in programming. I am still learning and always hope to see some good code written by others so that I can learn from them. Your idea seems similar to the shopping cart module which was once a single module. It was broken down to a few different smaller modules by raiwa and these modules can be called individually from the module content admin. So, you may want to decide what modules you want to be included in the checkout_success.php and then develop them as modules. @Demitry Link to comment Share on other sites More sharing options...
Dan Cole Posted October 17, 2019 Share Posted October 17, 2019 @Demitry I've never played around with that but I wonder if Gary's new Product Information system might point you in the right direction? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
burt Posted October 17, 2019 Share Posted October 17, 2019 I don't quite understand why you would need to call them individually? Can you explain more that? Link to comment Share on other sites More sharing options...
azpro Posted October 17, 2019 Share Posted October 17, 2019 6 hours ago, Demitry said: I want them all on the checkout_success.php page. However, to position them according to my custom template I need to call them individually. I think/presume @Demitry tries to implement the modules into a bought template and uses the template page as a start skeleton and then wants to call the modules one-by-one in the template. I made this mistake myself in the past .. Did not understand you have to take eg checkout_success.php as the start skeleton and then move the different bits of the (bought) template into modules template file ... Link to comment Share on other sites More sharing options...
Demitry Posted October 18, 2019 Author Share Posted October 18, 2019 Thank you all for your response. ok, so a bit more clarity on what I'm doing. I have a site where there are no left or right columns, so the center column stretches the width of the page. I added a simple template to some of the pages that breaks up that center column into two sections; the left is 8 col and the right is 4 (on desktop), ..along with a 1px border that separates them. See screenshot below. The yellow and green areas are part of this template. Calling the oscTemplate module block would place all the modules in either left or right sections. So, to break up these individual modules I could either create a new module folder (lets say call it checkout_success_rc .."rc" for right column) and place those modules in that folder. Then call it in the page template for that right side (see code structure below the image). However, I was wondering if there is a way to just call the individual modules instead of the entire set. If that was possible, then I would not need to create an additional module folder. I could just call individual modules from the same set into either the left column or the right column. <div class="contentContainer"> <div class="contentText row"> <div class="col-xs-12 col-sm-8 split-page-8-4-cs-left"> <?php echo $oscTemplate->getContent('checkout_success'); ?> <div class="clearfix"></div> </div> <div class="col-xs-12 col-sm-4 split-page-8-4-cs-right"> <?php echo $oscTemplate->getContent('checkout_success_rc'); ?> </div> </div> osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
LeeFoster Posted October 18, 2019 Share Posted October 18, 2019 Would the pi functionality not be the place to start for this? Combined with module control it could make the system extremely customisable. Link to comment Share on other sites More sharing options...
Demitry Posted October 19, 2019 Author Share Posted October 19, 2019 @Dan Cole I think the Product Information System that you’re referring to is part of the Phoenix release. I’m not familiar with it and this is the first I’m hearing of it. Though out of curiosity I’d love to know more about it. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Demitry Posted October 19, 2019 Author Share Posted October 19, 2019 Quote Would the pi functionality not be the place to start for this? Combined with module control it could make the system extremely customisable. Lee, I believe that you’re referring to the same Product Information System that Dan mentioned. I’m currently in the dark when it comes to that particular topic. However, I completely support any and all initiatives that would make this software easier to customize …and especially, for the non-technical user. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Dan Cole Posted October 19, 2019 Share Posted October 19, 2019 11 hours ago, Demitry said: @Dan Cole I think the Product Information System that you’re referring to is part of the Phoenix release. I’m not familiar with it and this is the first I’m hearing of it. Though out of curiosity I’d love to know more about it. @Demitry You'll find additional information about it in the Phoenix club...sign up there if you haven't already and you'll find a thread describing what it does and an explanation of how it works. Basically Gary has split the product information pages up into modules that you can control the placement of from the admin side....in addition to the normal sort order you can select whether something is placed at the top, left, right, perhaps center and bottom of the page. You can also control the width the item occupies. It in effect gives you total control over the placement of items on the product information page. It's a must have and should give you a good idea of how to achieve what you want. You'll need to become a supporter to get the actual code but you can at least have a look to see if it is the sort of thing you're trying to achieve. Supporting Phoenix is something everyone using osC, in it's various forms, should do. If it's not in a shop owners budget it needs to be. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
ArtcoInc Posted October 19, 2019 Share Posted October 19, 2019 @Demitry Just a quick, off-the-top-of-my-head thought ... could you do something like this: <div> <?php include module_1.php include module_2.php include module_3.php ?> </div> <div> <?php include module_4.php ?> </div> M Link to comment Share on other sites More sharing options...
Demitry Posted October 20, 2019 Author Share Posted October 20, 2019 @Dan Cole Dan, thank you for the explanation and yeah, it does seem like something I could use. Though is that something I can integrate with BS Edge?, ..because I am really not up to starting from scratch with a newer version of osC. @ArtcoInc hi Malcolm, Actually, I thought of doing the same thing, but only after I created this page post, lol. I have not tried it yet and my thoughts were that the modules have to be ran through the oscTemplate. However, I am not sure if that makes any difference in terms of security or anything else. I just don't know how calling the module block contents through the oscTemplate actually works. Perhaps I need to explore that first. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Dan Cole Posted October 20, 2019 Share Posted October 20, 2019 1 minute ago, Demitry said: Dan, thank you for the explanation and yeah, it does seem like something I could use. Though is that something I can integrate with BS Edge?, ..because I am really not up to starting from scratch with a newer version of osC. If you join the club and look through that thread someone might have commented about using it on EDGE...I'm just not sure. You could always ask there as well. Phoenix is just an improved version of EDGE so my guess is that it would work or could be made to do so fairly easily. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Demitry Posted October 21, 2019 Author Share Posted October 21, 2019 Ok, so a quick update,... I downloaded Phoenix v1.0.2.0 (Community Edition) and looked at the product_info.php page and related pi modules. It's pretty much the same as the BS Edge. So, I assume the new Product Information System is not in the "Community Edition." I also looked at the oscTemplate class (something I should have done from the start) and now understand it far better than I did before. After that I decided to test what Malcolm referred to and include the individual modules and their related language files in the Left Column and Right Column of my template. That did not work either and there were no errors in the error log. So, unless one of the Sr. developers has a quick working solution, I think my alternative is (as mentioned before), to just create another module block for the Right Column and move the individual modules I want to display in the Right Column to that module group folder. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
burt Posted October 21, 2019 Share Posted October 21, 2019 I'd suggest to read your own signature Quote osCommerce: made for programmers, ...because store owners do not want to be programmers. Are you a store owner or a programmer? If the former, support the programmers. If the latter, support the shopowners. Link to comment Share on other sites More sharing options...
Dan Cole Posted October 21, 2019 Share Posted October 21, 2019 7 hours ago, Demitry said: I downloaded Phoenix v1.0.2.0 (Community Edition) and looked at the product_info.php page and related pi modules. It's pretty much the same as the BS Edge. So, I assume the new Product Information System is not in the "Community Edition." @Demitry That is correct Demitry and the reason I suggested joining the Phoenix club and having a look through that thread. You can then decide if you want to become a supporter, which I'd highly recommend. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Demitry Posted October 21, 2019 Author Share Posted October 21, 2019 Quote That is correct Demitry and the reason I suggested joining the Phoenix club and having a look through that thread. You can then decide if you want to become a supporter, which I'd highly recommend. Cool, thanks man. I figured this was likely the case as soon as I saw "Community Edition." osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Demitry Posted October 21, 2019 Author Share Posted October 21, 2019 Quote If the latter, support the shopowners. I am supporting the shop owners,.. that's why I have a ton of contributions and am one of less than a handful of people still spending their personal time on releasing new ones. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Kevin.Dallas Posted October 30, 2019 Share Posted October 30, 2019 On 10/21/2019 at 4:49 PM, Demitry said: I am supporting the shop owners,.. that's why I have a ton of contributions and am one of less than a handful of people still spending their personal time on releasing new ones. <?php if ( !defined ( MODULE_THEME_SWITCHER_STATUS ) || MODULE_THEME_SWITCHER_STATUS != 'true' ) { ?> <link rel="stylesheet" type="text/css" href="ext/bootstrap/css/bootstrap.min.css"> <?php } ?> you can put it in your head Link to comment Share on other sites More sharing options...
Demitry Posted October 31, 2019 Author Share Posted October 31, 2019 Quote <?php if ( !defined ( MODULE_THEME_SWITCHER_STATUS ) || MODULE_THEME_SWITCHER_STATUS != 'true' ) { ?> <link rel="stylesheet" type="text/css" href="ext/bootstrap/css/bootstrap.min.css"> <?php } ?> you can put it in your head Thanks Kevin, but I don't use the Theme Switcher addon. And, I actually do need BootStrap for that page. I resolved this topic's issue by doing what I originally said,.. via separating the modules into two cm-folders and calling them each as a block in the related parts of my template. osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.