Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Sorry - could be less opaque! Try setting

z-index: 1;

 

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

  • Replies 186
  • Created
  • Last Reply
8 hours ago, inra311 said:

? Where?

in your user.css add

.cm_pi_buy_button, .cm-pi-review-button {
  z-index: 1;
}

 

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Use your browser's Inspect to check the style is actually being applied to the element. If it is, try increasing the z index.  For specific help in getting your layout to work, it would be better to start your own thread. It will make it easier to find for other people trying to solve a similar problem.

It could even be that one button is on top of the other, which will need a more complex solution.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Thanks, will do...

But you are right that it depends on the sort order. The buy button works when it is not followed by certain modules. It works e.g. before e.g. the product name but not before description. Maybe it works when the module coming next to it contains two DIV in the template, at least this is what the ones that are allright have in common??!!

Link to comment
Share on other sites

You are right, the delivered code does it when placed there. I'll investigate

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Quick and dirty fix because I did not look at the code here discussed - But probably you just need a clearfix div to separate button and roll-menu. So put before your roll-menu:

<div class="clearfix"></div>

 

Link to comment
Share on other sites

yes that fixes the lost button, button still not functioning on small screen,

added to start of /public_html/includes/modules/content/product_info/templates/tpl_cm_pi_buy_button.php.

this is only an issue on my test sites with moduler product info. Normal product info works fine.

image.png.1be7d43d4a81a04a02b92b041939c46e.png

 

Link to comment
Share on other sites

must be a know issue as its already been applied to review button in frozen.

<div class="clearfix"></div>
<div class="col-xs-<?php echo $content_width; ?> cm-pi-review-button">
  <?php
  echo tep_draw_button(MODULE_CONTENT_PI_REVIEW_BUTTON_TEXT, 'fas fa-comment-alt', tep_href_link('product_reviews.php', tep_get_all_get_params()));
  ?>
</div>

 

Link to comment
Share on other sites

2 hours ago, JcMagpie said:

yes that fixes the lost button, button still not functioning on small screen,

added to start of /public_html/includes/modules/content/product_info/templates/tpl_cm_pi_buy_button.php.

this is only an issue on my test sites with moduler product info. Normal product info works fine.

 

Sorry my error after clearing browser cache the button is now working perfectly.

 

Link to comment
Share on other sites

Social bookmarks Facebook Like doesn't work on a site with SSL

in includes/modules/social_bookmarks/fb_facebook_like.php change line 39 by taking out http: so that it reads

      return '<iframe src="//www.facebook.com/plugins/like.php?href=' . urlencode(tep_href_link('product_info.php', 'products_id=' . $_GET['products_id'], 'NONSSL', false)) . '&amp;layout=' . $style . '&amp;show_faces=' . $faces . '&amp;width=' . $width . '&amp;action=' . $action . '&amp;colorscheme=' . $scheme . '&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' . $width . 'px; height:35px;" allowTransparency="true"></iframe>';

if you want to use the module.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

  • 2 weeks later...
On 6/2/2018 at 11:03 AM, Jack_mcs said:

1 - In includes/modules/content/product_info\templates/tpl_cm_pi_price.php, the variables in sprintf are in the wrong order. Change


    <h2 class="h3 text-right-not-xs"><?php echo (tep_not_null($specials_price)) ? sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL, $specials_price, $products_price) : sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY, $products_price); ?></h2>

to


    <h2 class="h3 text-right-not-xs"><?php echo (tep_not_null($specials_price)) ? sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL, $products_price, $specials_price) : sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY, $products_price); ?></h2>

 

If i make this change i get the following output:

Special.thumb.png.acd145b6a47f121a3a5d68910a90c70d.png

The special and actual price are swapped. Is there any other changes that should be made also?

Link to comment
Share on other sites

Are you sure you made the change that I mentioned? What you are seeing on the site is the specials price and then the product price. If you look at the code I said to change, the order is specials and product, which is what is showing. My change was to make it product and specials. Regardless, the idea is to have the regular price first and struck out and then the specials price. So if your original code had it that way, switch back to that.

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

@CGhoST with this change you will also need to change the definition of MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL which is in

includes/languages/english/modules/content/product_info/cm_pi_price.php

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

On 6/2/2018 at 2:03 AM, Jack_mcs said:

In includes/modules/content/product_info\templates/tpl_cm_pi_price.php, the variables in sprintf are in the wrong order.

These variables can be in any order.  

Link to comment
Share on other sites

How can that be? It is a sprint call and the variables are used in the order given. It would make the function useless if the order didn't matter. Please explain what I am missing.

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

10 minutes ago, Jack_mcs said:

How can that be? It is a sprint call and the variables are used in the order given. It would make the function useless if the order didn't matter. Please explain what I am missing.

Variables can be given in any order, and then used in any order...

First See:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/modules/content/product_info/templates/tpl_cm_pi_price.php#L3

  • sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL, $specials_price, $products_price)
  • variable 1 = new [special] price
  • variable 2 = old [usual] price

Then See:
https://github.com/gburton/Responsive-osCommerce/blob/master/includes/languages/english/modules/content/product_info/cm_pi_price.php#L16

  • I first use #2 (old price) in the <del>
  • I then use #1 (new price) to show the cost

Notice the difference between using %s (which is what you are thinking, I think) and use of (eg) %2$s
In this way, you can do this:
 

define('BLAH_BLAH', '%1$s had a little %2$s, its fleece was white as snow and everywhere that %1$s went the %2$s was sure to go...');

and

echo sprintf(BLAH_BLAH, 'Mary', 'Lamb');

That's a dumb example, but shows the concept.

Link to comment
Share on other sites

I'm not sure we are talking about the same thing or maybe I just don't understand your reply. Given this command

sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL, $VAR_1, $VAR_2) 

are you saying the order of the two variables don't matter?

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

2 minutes ago, Jack_mcs said:

I'm not sure we are talking about the same thing or maybe I just don't understand your reply. Given this command


sprintf(MODULE_CONTENT_PI_PRICE_DISPLAY_SPECIAL, $VAR_1, $VAR_2) 

are you saying the order of the two variables don't matter?

That is exactly what I am saying, so long as you also take into account the placement of variables at the other end (language file).  See Mary Lamb example.

Link to comment
Share on other sites

Just now, burt said:

That is exactly what I am saying, so long as you also take into account the placement of variables at the other end (language file).  See Mary Lamb example.

Imagine a scenario like this;  "This Review was written by John on 01/12/2018.  John gave it 5 stars out of 5."

I now give you two ways:

define('REVIEW_TEXT', 'This Review was written by %1$s on 01/12/2018.  %1$s gave it %2$s stars out of 5.');

echo sprintf(REVIEW_TEXT, 'John', '5');

OR

define('REVIEW_TEXT', 'This Review was written by %s on 01/12/2018.  %s gave it %s stars out of 5.');

echo sprintf(REVIEW_TEXT, 'John', 'John', '5');

 

OK, both do the same thing.  Now take the scenario where shopowner wants to say this:   "This Product gets 5 stars from John!"

Easier to do this:

define('REVIEW_TEXT', 'This Product gets 2$s stars from %1$s.');

No need to even look at the main module file or the template file.  

In the way you understand (just using %s), an error would probably occur somewhere.  At the very least it gets super complicated staying in a linear outlook...

Link to comment
Share on other sites

18 minutes ago, burt said:

That is exactly what I am saying, so long as you also take into account the placement of variables at the other end (language file).

OK. I see what you are saying. However, the argument swapping is not working for some sites. It obviously works for some since someone posted that previously but I've had two sites where it failed. Don't know why. To be honest, I didn't look at the language file so I didn't know argument swapping was being used. It seems unnecessary for a dedicated definition like this but it is what it is.

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

  • burt changed the title to Frozen bug list

Archived

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

×
×
  • Create New...