Plugin Directory

Changeset 1487906


Ignore:
Timestamp:
09/01/2016 09:48:09 AM (10 years ago)
Author:
zibbra
Message:

Release 1.3.6

Location:
zibbra/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • zibbra/trunk/css/bpost.css

    r1474412 r1487906  
    1 #bpost_frontend_frame {
     1#shmFrame {
    22
    33    float: left;
  • zibbra/trunk/jscripts/bpost.js

    r1474412 r1487906  
    4545            method: "post",
    4646            action: this._uri,
    47             target: "bpost_frontend_frame"
     47            target: "shmFrame"
    4848        });
    4949
  • zibbra/trunk/jscripts/jquery.zoom.min.js

    r1308807 r1487906  
    11/*!
    2     Zoom v1.7.13 - 2014-04-29
    3     Enlarge images on click or mouseover.
    4     (c) 2014 Jack Moore - http://www.jacklmoore.com/zoom
    5     license: http://www.opensource.org/licenses/mit-license.php
    6 */
    7 (function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,n,e,i){var u,c,a,m,l,r,s,f=o(t).css("position"),h=o(n);return t.style.position=/(absolute|fixed)/.test(f)?f:"relative",t.style.overflow="hidden",e.style.width=e.style.height="",o(e).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*i,height:e.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){c=o(t).outerWidth(),u=o(t).outerHeight(),n===t?(m=c,a=u):(m=h.outerWidth(),a=h.outerHeight()),l=(e.width-c)/m,r=(e.height-u)/a,s=h.offset()},move:function(o){var t=o.pageX-s.left,n=o.pageY-s.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,m),0),e.style.left=t*-l+"px",e.style.top=n*-r+"px"}}},o.fn.zoom=function(n){return this.each(function(){var e,i=o.extend({},t,n||{}),u=i.target||this,c=this,a=o(c),m=document.createElement("img"),l=o(m),r="mousemove.zoom",s=!1,f=!1;(i.url||(e=a.find("img"),e[0]&&(i.url=e.data("src")||e.attr("src")),i.url))&&(function(){var o=u.style.position,t=u.style.overflow;a.one("zoom.destroy",function(){a.off(".zoom"),u.style.position=o,u.style.overflow=t,l.remove()})}(),m.onload=function(){function t(t){e.init(),e.move(t),l.stop().fadeTo(o.support.opacity?i.duration:0,1,o.isFunction(i.onZoomIn)?i.onZoomIn.call(m):!1)}function n(){l.stop().fadeTo(i.duration,0,o.isFunction(i.onZoomOut)?i.onZoomOut.call(m):!1)}var e=o.zoom(u,c,m,i.magnify);"grab"===i.on?a.on("mousedown.zoom",function(i){1===i.which&&(o(document).one("mouseup.zoom",function(){n(),o(document).off(r,e.move)}),t(i),o(document).on(r,e.move),i.preventDefault())}):"click"===i.on?a.on("click.zoom",function(i){return s?void 0:(s=!0,t(i),o(document).on(r,e.move),o(document).one("click.zoom",function(){n(),s=!1,o(document).off(r,e.move)}),!1)}):"toggle"===i.on?a.on("click.zoom",function(o){s?n():t(o),s=!s}):"mouseover"===i.on&&(e.init(),a.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(r,e.move)),i.touch&&a.on("touchstart.zoom",function(o){o.preventDefault(),f?(f=!1,n()):(f=!0,t(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),e.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}),o.isFunction(i.callback)&&i.callback.call(m)},m.src=i.url)})},o.fn.zoom.defaults=t})(window.jQuery);
     2 Zoom 1.7.15
     3 license: MIT
     4 http://www.jacklmoore.com/zoom
     5 */
     6(function($){var defaults={url:false,callback:false,target:false,duration:120,on:"mouseover",touch:true,onZoomIn:false,onZoomOut:false,magnify:1};$.zoom=function(target,source,img,magnify){var targetHeight,targetWidth,sourceHeight,sourceWidth,xRatio,yRatio,offset,$target=$(target),position=$target.css("position"),$source=$(source);$target.css("position",/(absolute|fixed)/.test(position)?position:"relative");$target.css("overflow","hidden");img.style.width=img.style.height="";$(img).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:img.width*magnify,height:img.height*magnify,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(target);return{init:function(){targetWidth=$target.outerWidth();targetHeight=$target.outerHeight();if(source===$target[0]){sourceWidth=targetWidth;sourceHeight=targetHeight}else{sourceWidth=$source.outerWidth();sourceHeight=$source.outerHeight()}xRatio=(img.width-targetWidth)/sourceWidth;yRatio=(img.height-targetHeight)/sourceHeight;offset=$source.offset()},move:function(e){var left=e.pageX-offset.left,top=e.pageY-offset.top;top=Math.max(Math.min(top,sourceHeight),0);left=Math.max(Math.min(left,sourceWidth),0);img.style.left=left*-xRatio+"px";img.style.top=top*-yRatio+"px"}}};$.fn.zoom=function(options){return this.each(function(){var settings=$.extend({},defaults,options||{}),target=settings.target||this,source=this,$source=$(source),$target=$(target),img=document.createElement("img"),$img=$(img),mousemove="mousemove.zoom",clicked=false,touched=false,$urlElement;if(!settings.url){$urlElement=$source.find("img");if($urlElement[0]){settings.url=$urlElement.data("src")||$urlElement.attr("src")}if(!settings.url){return}}(function(){var position=$target.css("position");var overflow=$target.css("overflow");$source.one("zoom.destroy",function(){$source.off(".zoom");$target.css("position",position);$target.css("overflow",overflow);$img.remove()})})();img.onload=function(){var zoom=$.zoom(target,source,img,settings.magnify);function start(e){zoom.init();zoom.move(e);$img.stop().fadeTo($.support.opacity?settings.duration:0,1,$.isFunction(settings.onZoomIn)?settings.onZoomIn.call(img):false)}function stop(){$img.stop().fadeTo(settings.duration,0,$.isFunction(settings.onZoomOut)?settings.onZoomOut.call(img):false)}if(settings.on==="grab"){$source.on("mousedown.zoom",function(e){if(e.which===1){$(document).one("mouseup.zoom",function(){stop();$(document).off(mousemove,zoom.move)});start(e);$(document).on(mousemove,zoom.move);e.preventDefault()}})}else if(settings.on==="click"){$source.on("click.zoom",function(e){if(clicked){return}else{clicked=true;start(e);$(document).on(mousemove,zoom.move);$(document).one("click.zoom",function(){stop();clicked=false;$(document).off(mousemove,zoom.move)});return false}})}else if(settings.on==="toggle"){$source.on("click.zoom",function(e){if(clicked){stop()}else{start(e)}clicked=!clicked})}else if(settings.on==="mouseover"){zoom.init();$source.on("mouseenter.zoom",start).on("mouseleave.zoom",stop).on(mousemove,zoom.move)}if(settings.touch){$source.on("touchstart.zoom",function(e){e.preventDefault();if(touched){touched=false;stop()}else{touched=true;start(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])}}).on("touchmove.zoom",function(e){e.preventDefault();zoom.move(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])}).on("touchend.zoom",function(e){e.preventDefault();if(touched){touched=false;stop()}})}if($.isFunction(settings.callback)){settings.callback.call(img)}};img.src=settings.url})};$.fn.zoom.defaults=defaults})(window.jQuery);
  • zibbra/trunk/jscripts/payment.js

    r1474412 r1487906  
    77        this._host = null;
    88        this._countdown = Zibbra.Payment.TIMEOUT;
     9        this._loading = false;
     10        this._timer = null;
    911       
    1012    }; // end function
     
    5557            $(".progress-bar").attr("aria-valuenow",percentage).css("width",percentage+"%");
    5658
    57             if((this._countdown % 5) === 0) {
     59            if((Math.floor(this._countdown) % 5) === 0) {
    5860
    59                 $.post(zibbra.getAjaxUrl(), data, function(response) {
     61                if(!this._loading) {
    6062
    61                     if(response.status === "success" || response.status === "error") {
     63                    this._loading = true;
    6264
    63                         location.href = response.url;
     65                    $.post(zibbra.getAjaxUrl(), data, function(response) {
    6466
    65                     } // end if
     67                        if(response.status === "success" || response.status === "error") {
    6668
    67                 }); // end getJSON
     69                            clearTimeout(self._timer);
     70
     71                            location.href = response.url;
     72
     73                        } // end if
     74
     75                        self._loading = false;
     76
     77                    }); // end getJSON
     78
     79                } // end if
    6880
    6981            } // end if
    7082
    71             this._countdown -= Zibbra.Payment.DELAY;
     83            this._countdown = this._countdown - Zibbra.Payment.DELAY;
    7284
    73             setTimeout(function() {
     85            this._timer = setTimeout(function() {
    7486
    7587                self.check();
  • zibbra/trunk/modules/checkout.php

    r1478800 r1487906  
    193193
    194194        $oPaymentAdapter = false;
     195        $oShippingMethod = false;
    195196        $oShippingAdapter = false;
    196197       
     
    259260            $number = $oOrder->getNumber();
    260261            $amount = $oOrder->getAmountIncl();
     262
     263            // Shipping costs
     264
     265            if(($shipping_cost = $adapter->getSessionValue("shipping.price",false)) !== false) {
     266
     267                $amount += ($shipping_cost * 1.21);
     268
     269            }elseif($oShippingMethod instanceof ZShippingMethod) {
     270
     271                $amount += $oShippingMethod->getPriceVatIncl();
     272
     273            } // end if
    261274           
    262275            // Load the customer
     
    274287                $oShippingAdapter->dispatch($oCustomer, $oOrder);
    275288           
     289            } // end if
     290
     291            // Get the payment adapter
     292
     293            if($oPaymentAdapter == false && ($payment = $adapter->getSessionValue("payment",false)) !== false) {
     294
     295                $oPaymentAdapter = ZPayment::get($payment);
     296
    276297            } // end if
    277298           
  • zibbra/trunk/modules/payment.php

    r1474412 r1487906  
    154154                        $response->url = $this->getReturnUrl();
    155155
     156                    }else{
     157
     158                        $response->status = "pending";
     159
    156160                    } // end if
    157161
     
    472476
    473477        wp_enqueue_style("wp-plugin-zibbra-payment", plugins_url("css/payment.css",ZIBBRA_BASE_DIR."/css"));
    474         wp_enqueue_script("wp-plugin-zibbra-payment", plugins_url("jscripts/payment.js",ZIBBRA_BASE_DIR."/jscripts"));
     478        wp_enqueue_script("wp-plugin-zibbra-payment", plugins_url("jscripts/payment.js",ZIBBRA_BASE_DIR."/jscripts"), $deps = array(), "1.3.7");
    475479
    476480        // Return template name
  • zibbra/trunk/modules/shipping.php

    r1474412 r1487906  
    132132     */
    133133    private function onCancel(WP_Query $wp_query) {
     134
     135        // Get the library adapter
     136
     137        $adapter = Zibbra_Plugin_Controller::getInstance()->getLibrary()->getAdapter();
     138
     139        // Log the request
     140
     141        $adapter->log(LOG_DEBUG, "shipment|cancel\nGET:".print_r($_GET,true)."POST:".print_r($_POST,true)."SERVER:".print_r($_SERVER,true));
     142
     143        // Get the orderid from session
     144
     145        if(($orderid = $adapter->getSessionValue("order.id",false))!==false) {
     146
     147            // Clear the order information from session
     148
     149            $adapter->clearSessionValue("order");
     150            $adapter->clearSessionValue("order.id");
     151            $adapter->clearSessionValue("order.amount");
     152
     153            // Cancel the order
     154
     155            ZOrder::cancel($orderid);
     156
     157        } // end if
     158
     159        // Notify the user
     160
     161        Zibbra_Plugin_Notify::register(Zibbra_Plugin_Notify::STATUS_WARNING, __("Your order has been cancelled", Zibbra_Plugin::LC_DOMAIN));
     162
     163        // Redirect to the checkout page
     164
     165        wp_redirect(site_url("/zibbra/checkout/"));
     166        exit;
    134167       
    135168    } // end function
     
    314347                $oShippingMethod = $oOrder->getShippingMethod();
    315348
     349                // Get the shipping cost
     350
     351                $shipping_cost = $adapter->getSessionValue("shipping.price", 0);
     352
    316353                // Confirm order with shipping info
    317354
    318                 ZShippingAdapterBpost::confirm($oOrder, $oShippingMethod->getEnterpriseshippingmethodid(), $oOrder->getAmountIncl(), $_POST);
     355                ZShippingAdapterBpost::confirm($oOrder, $oShippingMethod->getEnterpriseshippingmethodid(), $shipping_cost, $_POST);
    319356
    320357                // Update session info & redirect
    321358
    322359                $adapter->setSessionValue("shipping.complete", true);
     360
    323361                $uri = site_url("/zibbra/checkout/?continue");
    324362                echo "<script> window.top.location = '" . $uri . "'; </script>";
  • zibbra/trunk/readme.txt

    r1478800 r1487906  
    44Contributors: Zibbra
    55Tags: Ecommerce, Cloud
    6 Stable tag: 1.3.2
     6Stable tag: 1.3.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151
    5252== Changelog ==
     53
     54= 1.3.6 =
     55
     56* Bugfix shipping costs
     57
     58= 1.3.5 =
     59
     60* Bugfix Mollie payment validation
     61* Bugfix bpost shipping integration
     62
     63= 1.3.4 =
     64
     65* Improvement Mollie payment validation
     66
     67= 1.3.3 =
     68
     69* Bugfixes bpost integration
    5370
    5471= 1.3.2 =
  • zibbra/trunk/templates/shipping-bpost.php

    r1474412 r1487906  
    33defined("ZIBBRA_BASE_DIR") or die("Restricted access");
    44
     5//echo "<pre>";
     6//print_r($bpost_config);
     7//exit;
     8
    59?>
    610
    7 <iframe id="bpost_frontend_frame" name="bpost_frontend_frame"></iframe>
     11<iframe id="shmFrame" name="shmFrame" width="790" height="520" style="border:none;"></iframe>
    812
    913<script type="text/javascript">
  • zibbra/trunk/zibbra.php

    r1478800 r1487906  
    66 * Plugin URI: http://wordpress.org/plugins/zibbra/
    77 * Description: Zibbra integration plugin for Wordpress
    8  * Version: 1.3.2
     8 * Version: 1.3.6
    99 * Author: Zibbra
    1010 * Author URI: https://www.zibbra.com
     
    8181        const FORM_ACTION = "zibbra";
    8282        const ROLE = "customer";
    83         const VERSION = "1.3.2";
     83        const VERSION = "1.3.6";
    8484       
    8585        private $controller = null;
Note: See TracChangeset for help on using the changeset viewer.