Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] Modular Product Page (Bootstrap)


kymation

Recommended Posts

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@@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.

Link to comment
Share on other sites

@@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
Link to comment
Share on other sites

@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() ) ");
Link to comment
Share on other sites

@@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.

Link to comment
Share on other sites

i looked at the files and wondered where the model is ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@@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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
 

 

 

product_info.php

Link to comment
Share on other sites

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
Link to comment
Share on other sites

i guess its this line of code that cause me trouble if i'm doing right where to insert it :

 

 

echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); 

 

 

I compared it with Winmerge but when I compare it myself I see this part of code is inserted in total other line then your product_info.

 

 

So i changed it same way as provided, but result is the same

Edited by SpicyGirl
Link to comment
Share on other sites

Don't try to patch the product_info.php file, just replace yours with the one in the package.

 

The error messages are saying that the Product Data header tags module is not installed or is disabled. I don't know what else would cause that.

 

Regards

Jim

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

Link to comment
Share on other sites

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.

@@14steve14,

 

the way Jim build addons should be the way for all the addons. Every page has his entries & addons are build on that entry.

No more (or few) core code changes will make the system more stable & attractive.

Now we have plenty of addons to build the shop we want, but for one addon you have to delete tep_draw_go_home, the other one wants to replace it and the third ones NEEDS it. For the average store owner its toooooooooooooooo complicated.

And some addons pretent to be for BS, but the added files are not BS files !!! It could work, but on the next addon your shop is messed up.

Or it works & older installed addons are not working properly anymore.

Many times I told myself; stop this never ending osc story, stay selling by ebay, no shop, no troubles, no worries, no problems, no stress.

But Im stubbornly and keep trying and going on.

Link to comment
Share on other sites

When I used your product_info it works except :

Product options !!

When I sellect that option & click on install this module button i get the next error message :

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.1, 'The version of this module that you are running', '6', '0', 'tep_cfg_disabl' at line 1

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', 1.0.1, 'The version of this module that you are running', '6', '0', 'tep_cfg_disabled(', now() )  

 

I'm running on php 5.4.45

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...