Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1200
    Profile photo of beverlyclaire
    beverlyclaire
    Participant

    Hello everyone,

    I’m currently building my Japanese language Symbio site:

    http://stockphotos-japan.beverlyclaire.com

    Stats:
    Symbiostock 3.3.4
    Wordpress 3.8.2
    PHP 5.4.24

    It’s still in test mode so I have search engines discouraged and no networking.

    The currency I selected in the Bee > Settings tab is Japanese Yen. I had someone do a test purchase with a small image (100 yen, about US$ 1) and it worked fine.

    My problem has to do with the display of currency involving four digit figures. In Japan, US$ 10 (ten US dollars) is about JPY 1000 (one thousand yen). Needless to say, the L images on my site are JPY 1000 or more (for the 3D stills and vectors I plan to upload eventually). However, when the buyer selects an L size the cart button displays 0.01 instead of 1000 yen.

    For example:

    Image A: XS size for 100 yen +
    Image B: L size for 1000 yen
    Total= 1100 yen (about 11 US$)

    but the cart total shows 100.01

    After clicking on the Add to Cart button (i.e., default DOWNLOAD button), the Customer Area (default: Customer License and File Management Area) displays an incorrect total (like the 100.01 above), but when clicking on the Buy Now button and going to the Paypal page, the correct total is shown (1100 yen in the example above) on Pappal.

    I’d love to launch and join the network, but I wouldn’t be able to unless I find a workaround for this. I’ve thought of having the entire site in Japanese and just pricing in US$, but I really want to make the site a niche one for the Japanese market so that just won’t cut it.

    Please advice!

    thank you,

    Claire

    PS. I don’t know if I explained things clear enough. If you like you may register at my site, and add an L size image to your cart to see what I mean. Thanks!

    #10832
    Profile photo of Christine
    Christine
    Participant

    Hi Clair and Welcome to Symbiostock

    This is a known issue, if you have any single figure over 999 then it reverts to .01

    You can have 3 digit numbets that total over 1000 and they work

    Hopefully someone will find a way of fixing this problem

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #10833
    Profile photo of beverlyclaire
    beverlyclaire
    Participant

    Hi Christine,

    Thanks for the welcome! I went over to StackExchange/StackOverflow to ask for ideas and found a solution:

    In the cart.php file’s get_cart_value() function:

        public function get_cart_value(){

    $cart = $this->cart;
    $prices = array();

    $cart = apply_filters('ss_mod_cart_value', $cart);

    foreach ($cart as $product){

    array_push( $prices, array('price'=>trim($product), 'discount' => trim($product )));
    }

    $total = 0;

    foreach($prices as $price){


    $price = $this->calc_discount($price, $price);

    //$price = str_replace('.', '', $price);
    $price = floatval(preg_replace('/[^d.]/', '' , $price));

    $total += $price;
    }

    //$total = number_format($total/100, 2);
    $total = number_format($total, 2);

    return $total;

    }

    I replaced the string conversion to float and changed the total to fit the number of decimal places. Now the cart displays the 4-digit values correctly 😀

    Here is the thread I started at StackExchange:
    http://stackoverflow.com/questions/22979537/displaying-currency-values-greater-than-1000

    The thread I used for reference:
    http://stackoverflow.com/questions/5139793/php-unformat-money

    Hope this will be helpful to someone else looking for a solution while waiting for the big new version (Symbio 3.4? 4.0? 🙂 )

    #10834
    Profile photo of Christine
    Christine
    Participant

    Well Done Claire

    I found the problem but did not have a clue what to do about it, I will change the heading so that others with this issue can find it

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #10835
    Profile photo of JoRodrigues
    JoRodrigues
    Participant

    Thanks for letting us know! I didn’t know about this.

    Jo

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.