Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

hi,

Can someone please help?

Have 234.1Edge (BS) version, trying to modify the skin, and template. There are VIEW and BUY button in the index.php and in new product page, it will become BUY NOW with shopping cart, I like to change BUY NOW to BUY, which file should I modify?

Thanks!  Lyn

Link to comment
Share on other sites

spend whole day to figure out the buttons, but no much good luck!

button-modification-02.PNG.5c217014ecd95d3ae880836828f12c26.PNG

In the above image, the buy now button now change to buy, however how can i change the button color from green to something else? And how can i change the button position?

button-modification-03.PNG.5430734f71b6315f3f88eda829c4e0ff.PNG

the image above has problem to show the QUOTE button when the price is empty or $0.00.

I had tried
catalog/includes/modules/new_products.php
catalog/includes/modules/product_listing.php
catalog/includes/modules/index/templates/tpl_cm_i_new_products.php
catalog/includes/modules/index_nested/templates/tpl_cm_in_new_products

code in 4 location not all exactly the same, but similar like this

              //BOF 8522 Email For Quote v1.2
              // if($new_products['products_price'] <= 0){
              for ($x = 0; $x < $no_of_new_products; $x++) {
              if (is_email_for_quote(($new_products[$x]['products_id']) <= 0)) {
              $price_display = show_email_for_quote($new_products);
              } else {
              //EOF 8522 Email For Quote v1.2
              
               echo '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$new_products['products_id']) . '" data-has-attributes="' . ((tep_has_product_attributes((int)$new_products['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$new_products['in_stock'] . '" data-product-id="' . (int)$new_products['products_id'] . '" class="btn btn-success btn-index btn-buy" role="button">' . MODULE_CONTENT_NEW_PRODUCTS_BUTTON_BUY . '</a>';
              //BOF 8522 Email For Quote v1.2
              }
              }
              //EOF 8522 Email For Quote v1.2  

@burthi

Sorry to tag you, could not get anyone help so far, and since you are the main developer, familiar with the system, I believe you can give me some help in short time, I had tried couple days and have no clue what should do to show the right button (quote), button name (MODULE_CONTENT_NEW_PRODUCTS_BUTTON_BUY, how to change the name?) button skin design and button position.

Many thanks!  Lyn

Link to comment
Share on other sites

learn to use the developer tools in your browser. Simply inspect the element your after and it will tell you which class and css is driving it. For the buy button its this

you can even edit the text and color in the browser inspector to see the changes before you make them in the code.

image.thumb.png.ee85ef27f1e5498a12ec7275c453ff9a.png

 

Link to comment
Share on other sites

You can, and should, keep a copy of your files on your computer. Then you can use your computers search to find the file you are looking for.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

9 hours ago, JcMagpie said:

learn to use the developer tools in your browser. Simply inspect the element your after and it will tell you which class and css is driving it. For the buy button its this

you can even edit the text and color in the browser inspector to see the changes before you make them in the code.

image.thumb.png.ee85ef27f1e5498a12ec7275c453ff9a.png

@JcMagpie hi,

Thank you very much for the advise. Before I submitted the post, what I tried is to copy the ext/boostrap/css files to user.css. copy the btn-success and rename to btn-quote and try to change the colour there, however it doesn't seems working....

Thanks!  Lyn

Link to comment
Share on other sites

9 hours ago, Jack_mcs said:

You can, and should, keep a copy of your files on your computer. Then you can use your computers search to find the file you are looking for.

@Jack_mcshi,

Thank you for the advise. Yes I did have copy of entire website, and no problem to find the files I need. I have problem to find the code that related to index page where New Product of the Month setting.

I follow the installation of Eamil for Quote for 2.3.1 version.
Due to the version differences, some code in 2.3.1 has moved to module, so I also tried to find the related file to put the code, and it works for most of the function. If the price is 0, it show up quote button for individual product on the product_info.php

The only thing doesn't work properly is the index page Product of the Month. The default buttons are VIEW and BUY, with email for quote, if it is $0 or with no price, it should show up VIEW and QUOTE instead. However it is still show up BUY and people can put them into shopping cart, this is not what I want, I need it to show up QUOTE and people send the quote to the the website owner...

I have spend days to modify these 4 files, with no luck so far though 😭...

 

====================================================================catalog/includes/modules/new_products.php
This one is related to the catalog/products_new.php and whatever I change it did not affect the index button design....

====================================================================


catalog/includes/modules/product_listing.php
This is the one if you click on infobox what's new, I can modify the button cart icon + BUY NOW to BUY from product_listing.php again not the index button design


====================================================================catalog/includes/modules/index/templates/tpl_cm_i_new_products.php
put the if the price is >0 then it show BUY otherwise it show QUOTE, was hoping this will make the change on index page, but nothing happened
====================================================================


catalog/includes/modules/index_nested/templates/tpl_cm_in_new_products
put the if the price is >0 then it show BUY otherwise it show QUOTE, was hoping this will make the change on index page, but nothing happened

Any other files I missed and should change?


(I am thinking to leave this error for now until someone can help with a working solution, and try another addon that can change from New Product of the Month to Categories and Sub-categories on index page, maybe then it doesn't really matter as long as if $0 or non can show up button on product_info.php)

And still trying to figure out how to modify the button skin and position...i guess need more time to practice.....

Thanks!  Lyn

Link to comment
Share on other sites

9 hours ago, Jack_mcs said:

You can, and should, keep a copy of your files on your computer. Then you can use your computers search to find the file you are looking for.

@Jack_mcs hi,

I just found out that you have addon quotes (#6675), it looks great from the file structure, I will give it a try now.

Thanks!  Lyn

Link to comment
Share on other sites

3 hours ago, ce7 said:

@Jack_mcs hi,

I just found out that you have addon quotes (#6675), it looks great from the file structure, I will give it a try now.

Thanks!  Lyn

 @Jack_mcs  hi,

Spend half day to try your addon quotes (for osc 2.2) on 234.1 Edge (BS), mostly seems working except 2 parts need to modify. The front page infobox for best_seller, categories, information, whats_new seems with problem so instead of showing those infobox on the right, it all show up in the left, but it show up the quote infobox, so the whole template went bit silly. If I put unmodified files back, the website design go back to normal, infobox on right or left as it should be, but then the infobox for quote doesn't show up.... I will spend a bit more time to try later.

For now I like to ask your advise on admin/categories.php
as the date javascript doesn't seems working, so i copy

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_date_available', $pInfo->products_date_available, 'id="products_date_available"') . ' <small>(YYYY-MM-DD)</small>'; ?></td>

and try to modify to use for quotes. but i have no idea few parts of the code meaning...(sorry not programmer), here is the code I modified, but it doesn't show up the date picker, only allow me to enter the date format manually

  <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('quotes_expires_on', $pInfo->quotes_date_expires, 'id="quotes_date_expires"') . ' <small>(YYYY-MM-DD)</small>'; ?></td>

so i guess i need to understand how these two bits of code working:


$pInfo->quotes_date_expires,
'id="quotes_date_expires"')
How can I make the modification work properly?

Thanks!  Lyn

Link to comment
Share on other sites

8 hours ago, ce7 said:

what I tried is to copy the ext/boostrap/css files to user.css. copy the btn-success and rename to btn-quote and try to change the colour there, however it doesn't seems working....

Well that will not work you need to define the btn-quote as it is not a recognised class for button. So if you have replaced btn-success with btn-quote you then need to go to your user.css and define the styling for this new button.

.btn-quote {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}

.btn-quote :hover {
color: #fff;
background-color: #25f725;
border-color: #4cae4c;
}

 

Link to comment
Share on other sites

8 hours ago, ce7 said:

Spend half day to try your addon quotes (for osc 2.2) on 234.1 Edge (BS), mostly seems working except 2 parts need to modify.

I'm sorry to say that there will probably be quite a few more problems than that. Many changes would be needed to get the Quotes addon to work properly in a BS shop. For example, the problem you are seeing with the infobox is because the BS version uses modules for infoboxes so using a 2.2 infobox will break the display layout. There are also many definitions in it, like FILENAME_XXX and DIR_XXX, that are not available in the BS shop. And I don't think the quotes page will display properly on a mobile device.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

12 hours ago, Jack_mcs said:

I'm sorry to say that there will probably be quite a few more problems than that. Many changes would be needed to get the Quotes addon to work properly in a BS shop. For example, the problem you are seeing with the infobox is because the BS version uses modules for infoboxes so using a 2.2 infobox will break the display layout. There are also many definitions in it, like FILENAME_XXX and DIR_XXX, that are not available in the BS shop. And I don't think the quotes page will display properly on a mobile device.

@Jack_mcsHi,

Thank you for reply. The DIR i have define in the configure.php so most of the 2.2 or 2.3 version still can be used in BS. And the FILENAME_ is indeed causing the problem if without any change to 'filename.php'; so I change it for every addon if it is version 2.2. or 2.3.

When I tried to modify addon_installed for 2 date picker, I remember Tsimi helped me out, so I will go to find out the file and maybe can fix the date picker problem.
I haven't test on mobile site yet, need to fix the errors first, i will come back to update later on.

Once again, thank you!

Link to comment
Share on other sites

16 hours ago, JcMagpie said:

Well that will not work you need to define the btn-quote as it is not a recognised class for button. So if you have replaced btn-success with btn-quote you then need to go to your user.css and define the styling for this new button.

.btn-quote {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}

.btn-quote :hover {
color: #fff;
background-color: #25f725;
border-color: #4cae4c;
}

@JcMagpie  hi,

Thank you for the example. I did have the .btn-quote in user.css, but i did not define the hover one...I will give it a try later. Thanks again for your help!

Link to comment
Share on other sites

6 hours ago, ce7 said:

@JcMagpie  hi,

Thank you for the example. I did have the .btn-quote in user.css, but i did not define the hover one...I will give it a try later. Thanks again for your help!

With small things like this it's can be a lot quicker to post a link to the page if its a live site.  It can be debuged in a few seconds 😊 saves time all round.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...