Jump to content



Photo
- - - - -

[Addon] Modular Product Page (Bootstrap)

bs bootstrap responsive

  • Please log in to reply
91 replies to this topic

#1   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 March 2016 - 00:55

This addon is designed to make changes to the product pages of an osCommerce store easy and simple. It is particularly intended for new users of the software, but can be used by anybody.

 

Elements in the center section of the page can be added, removed, and reordered from the Admin panel. There is only one core file to change; the rest is done from your Admin.

 

The initial Addon contains all of the modules needed to replace the stock Product Info page. More modules are planned (I have an improved Reviews module already coded).

 

The Addon is here.

 

Regards

Jim


Edited by kymation, 16 March 2016 - 00:58.

See my profile for a list of my addons and ways to get support.


#2   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 March 2016 - 20:37

I have uploaded a new package that fixes a couple of minor bugs. If you already have this installed, please replace these files:

  • catalog/includes/classes/product_info.php
  • catalog/includes/modules/content/product_info/cm_pi_options.php
  • catalog/includes/modules/content/product_info/templates/cm_pi_options.php

 

Please let me know by posing here if you find any more bugs, or if you have any problems with this Addon.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#3   piernas

piernas
  • Members
  • 462 posts
  • Real Name:Juanma
  • Gender:Male
  • Location:Madrid

Posted 16 March 2016 - 23:00

Exactly what I had started last week. Thanks so much!



#4   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 16 March 2016 - 23:09

@piernas  Oops! I didn't know anybody else was working on this. I needed it for a client's new store, so....

 

You're welcome to make some new modules for it. I've already uploaded an improved Reviews module, and I have another one in the works to add images to the Options pulldowns. I'll upload that one when I get it finished.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#5   piernas

piernas
  • Members
  • 462 posts
  • Real Name:Juanma
  • Gender:Male
  • Location:Madrid

Posted 16 March 2016 - 23:53

@piernas  Oops! I didn't know anybody else was working on this. I needed it for a client's new store, so....

 

You're welcome to make some new modules for it. I've already uploaded an improved Reviews module, and I have another one in the works to add images to the Options pulldowns. I'll upload that one when I get it finished.

 

Regards

Jim

 

I was just starting with the products class but those damn attributes were diving me mad, then I saw the posts about the products class here and stopped for a while. You saved me a lot of headaches :D

 

Will play with it and see what else can be done in the products class. One of the things I have in mind is a different images module.

 

BTW I know it's easier to install with a header tags module but wouldn't it be cleaner adding it to the products info page directly?


Edited by piernas, 16 March 2016 - 23:53.


#6   piernas

piernas
  • Members
  • 462 posts
  • Real Name:Juanma
  • Gender:Male
  • Location:Madrid

Posted 17 March 2016 - 00:02

@kyrmation found a typo on the products options module - installing module version line should be this:

      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Module Version', 'MODULE_CONTENT_PRODUCT_INFO_OPTIONS_VERSION', '" . $this->version . "', 'The version of this module that you are running', '6', '0', 'tep_cfg_disabled(', now() ) ");


#7   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 March 2016 - 00:07

@piernas  Attributes are a pain. I'm not sure that what I did is the best, but it seems to work out well enough.

 

I wanted the minimum on the product_info.php so that it would be easier to change later. I would rather replace or amend a module than replace a core file. More than once, anyway.

 

Thanks for the bug report. I'll fix that and upload a new version.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#8   piernas

piernas
  • Members
  • 462 posts
  • Real Name:Juanma
  • Gender:Male
  • Location:Madrid

Posted 17 March 2016 - 00:12

@kymation I could not make the reviews button to display. It is hidden even if the module is enabled. Will check what happens, too.



#9   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,773 posts
  • Real Name:Carine Bruyndoncx
  • Gender:Female
  • Location:Belgium/ Antwerp/ Turnhout/ Arendonk

Posted 17 March 2016 - 00:45

i looked at the files and wondered where the model is ?
KEEP CALM AND CARRY ON
FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#10   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 March 2016 - 01:02

@bruyndoncx  Where's the model on the Bootstrap Edge page? Same place as the URL, I expect.

 

Either of these would be easy to add if someone wants them. I coded the product_info class to provide the data.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#11 ONLINE   14steve14

14steve14
  • Members
  • 4,364 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 17 March 2016 - 08:40

Jim

 

You are one of only a few coders that have finally embraced the whole concept of the bootstrap version and are trying to reduce core code changes, and make the whole system modular. Congratulations, the work you are doing must be helping to move the BS version of oscommerce forward. Thank you for the great work.

 

I have added both the modular product and index pages to my test store and they seem to work very well. Hopefully others will produce even more modules and ideas to enhance what is already available.


REMEMBER BACKUP, BACKUP AND BACKUP

 

Find information about the bootstrap community version here

 

Success is the ability to go from one failure to the next without any loss of enthusiasm


#12   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 March 2016 - 16:03

@14steve14  I've been trying to make osCommerce more modular for years. I released Modular Front Page in November 2010, long before content modules even existed.

 

And I intend to keep writing modules. I have released several additional modules for the front page and for the product page, and others have also contributed modules. Maybe I need to start a list. Something like Gary's list of Bootstrap Addons. Hmmm....

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#13 ONLINE   14steve14

14steve14
  • Members
  • 4,364 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 17 March 2016 - 16:51

The trouble with making a list in a post is that the post will eventually disappear off the pages and no one will find it. I used the one in your signature to find what I wanted.


REMEMBER BACKUP, BACKUP AND BACKUP

 

Find information about the bootstrap community version here

 

Success is the ability to go from one failure to the next without any loss of enthusiasm


#14   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 March 2016 - 18:40

The list in my sig is useful, but it only shows my modules. Maybe I can figure a way to add another column of Responsive modules that would include other people's work.

 

I'm open for ideas here.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#15   TITO4

TITO4
  • Members
  • 45 posts
  • Real Name:Agustín
  • Gender:Male
  • Location:Seville, Spain

Posted 17 March 2016 - 20:01

Hi Jim,

 

I've just tested and it works great. Thanks again! Unfortunately, I have some other addons installed in product_info (Option Types, Availability, Price excluding VAT, KissIT...), so I'll try to mix it to get them working. (Attributes and options didn't work, but perhaps because I have installed Option Types).

 

May I give an idea? I think it would be very useful to modificate admin/modules_content.php to have the capability of changing status as we do in admin/categories (just clicking on red/green button), instead of entering on each module, putting them in "false" etc. With the increasing number of modules in content I think it would be a good idea.

Sorry, but due to my scarce abilities, I am not able of doing it...

 

Regards


Shopowner, not coder, experienced copypaster  :D


#16   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 17 March 2016 - 20:09

Other addons should be via a new module that contains the necessary code changes. I can't make all of these modules, so I need others to help. Please consider uploading any new modules to the addons area.

 

That sounds like a good addition to modules_content.php. Unfortunately I am not in charge of modifications to the core code. Maybe you could suggest this to @burt.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#17   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 22 March 2016 - 21:22

I've uploaded a new version that fixes the SQL error reported by @piernas and some that I found. If you are updating, please replace all of the module files and reinstall.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#18   SpicyGirl

SpicyGirl
  • Members
  • 120 posts
  • Real Name:Camella Angelita Sanchez Guadaloupe
  • Gender:Female
  • Location:Veracruz

Posted 27 March 2016 - 18:29

Hola Jim,

 

 

have just installed this addon and have an error in the product_info.php that cals :

Fatal error: Call to a member function product_exists() on a non-object in /home2/hellcars/public_html/bs9/includes/modules/content/product_info/cm_pi_cart_button.php on line 39

 

this is loine 39 :       if (isset($product_info) && $product_info->product_exists() === true) {

 
and the banner rotator is not runner anymore ( pictures are one under the other.
 
seems strange for me becose there no changes in index.php
 
I have this problems when I used the modules price, buttons, also purchades, product_not_found
 
Fatal error: Call to a member function product_exists() on a non-object in /home2/hellcars/public_html/bs9/includes/modules/content/product_info/cm_pi_description.php on line 41
 
when install product_description, product_image
 
shop is heavy modified but working properly.
This addon would be great in my shop, otherwise I have to messed up some core & css files  :)  :)  :)
 
I attached my product_info.php becose I think there is the problem, didn see well how to integrate your part properly, becomes tooooooooo complicated 4 me.
 
All other addons like carousel and so are working fine. (Remember? that was caused of Header tags SEO that used old core codes, i compared with original bs files and makes everything working as I wished)
 
Remember I'm running OSC 234BS EDGE
 
Are you able to help me please?
 
Thanks a lot
kind regards
Camella
 

 

 

Attached Files



#19   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 27 March 2016 - 19:02

You haven't installed the Product Data module under Header Tags. See Section 3.2 in the User's Manual.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.


#20   SpicyGirl

SpicyGirl
  • Members
  • 120 posts
  • Real Name:Camella Angelita Sanchez Guadaloupe
  • Gender:Female
  • Location:Veracruz

Posted 27 March 2016 - 19:46

Nop, I did & uninstall again becose of errors. With or without Product data the errors stays.

 

 

front page, categories, sub-categories and so on work properly, it's only the product_info.php that has errors


Edited by SpicyGirl, 27 March 2016 - 19:53.