Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Sprintf and quotation marks

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1350 Views
  • go2planC
    Avatar
    Community Member
    19 Posts

    Sprintf and quotation marks Link to this post

    Hi

    I'm new to this module and not sure if i have just overlooked something or whether it's just that i'm running SS in XAMPP on a windows platform but within the supplied templates you seem to have used quotation marks within quotation marks quite a lot.

    --Example--
    the sprintf data within the alt atribute is creating invalid html and causing errors

    //product.ss --- line 17

       <img class="productImage" src="$Image.ContentImage.URL" alt="<% sprintf(_t("IMAGE","%s image"),$Title) %>" />

    --fix--

       <img class="productImage" src="$Image.ContentImage.URL" alt="<% sprintf(_t('IMAGE','%s image'),$Title) %>" />

    I have had to go through and change this within every supplied template file (Not the most exciting thing i've had to do today).

    To finish on a high point - this seems to be an amazing module. Good work

    Rob

  • go2planC
    Avatar
    Community Member
    19 Posts

    Re: Sprintf and quotation marks Link to this post

    Sorry have answered my own question. Installed on test server (linux) with my hosting provider and seems to work fine.

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: Sprintf and quotation marks Link to this post

    Are you saying that this problem only appears to you on your local windows machine?
    I ask because I am also having this same problem, and also have a linux server that I will use to going live.

    Did you use the modified templates on the Linux box, or just local?

    Any other fix found for the windows server?

    thanks in advance for any help you can provide.

  • go2planC
    Avatar
    Community Member
    19 Posts

    Re: Sprintf and quotation marks Link to this post

    Sorry no fix for it as yet. It is strange that it only happens on my windows machine. I also get the same problem using the dataobject manager in the admin section as well.

    My suggestion is put the basics together on your windows machine - upload to to linux server and finish off the rest there. If I find anything else out i will post it here.

  • DusX
    Avatar
    Community Member
    12 Posts

    Re: Sprintf and quotation marks Link to this post

    please do.
    Seams with so much SS dev going on for the windows platform that this would be a high priority issue, since it makes things rather ugly both on the front end and back end.

    1350 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.